id int32 0 167k | repo stringlengths 5 54 | path stringlengths 4 155 | func_name stringlengths 1 118 | original_string stringlengths 52 85.5k | language stringclasses 1
value | code stringlengths 52 85.5k | code_tokens list | docstring stringlengths 6 2.61k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 85 252 |
|---|---|---|---|---|---|---|---|---|---|---|---|
134,400 | ory/hydra | sdk/go/hydra/client/admin/list_subject_consent_sessions_parameters.go | WithTimeout | func (o *ListSubjectConsentSessionsParams) WithTimeout(timeout time.Duration) *ListSubjectConsentSessionsParams {
o.SetTimeout(timeout)
return o
} | go | func (o *ListSubjectConsentSessionsParams) WithTimeout(timeout time.Duration) *ListSubjectConsentSessionsParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"ListSubjectConsentSessionsParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"ListSubjectConsentSessionsParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the list subject consent sessions params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"list",
"subject",
"consent",
"sessions",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/list_subject_consent_sessions_parameters.go#L73-L76 |
134,401 | ory/hydra | sdk/go/hydra/client/admin/list_subject_consent_sessions_parameters.go | WithContext | func (o *ListSubjectConsentSessionsParams) WithContext(ctx context.Context) *ListSubjectConsentSessionsParams {
o.SetContext(ctx)
return o
} | go | func (o *ListSubjectConsentSessionsParams) WithContext(ctx context.Context) *ListSubjectConsentSessionsParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"ListSubjectConsentSessionsParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"ListSubjectConsentSessionsParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the list subject consent sessions params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"list",
"subject",
"consent",
"sessions",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/list_subject_consent_sessions_parameters.go#L84-L87 |
134,402 | ory/hydra | sdk/go/hydra/client/admin/list_subject_consent_sessions_parameters.go | WithHTTPClient | func (o *ListSubjectConsentSessionsParams) WithHTTPClient(client *http.Client) *ListSubjectConsentSessionsParams {
o.SetHTTPClient(client)
return o
} | go | func (o *ListSubjectConsentSessionsParams) WithHTTPClient(client *http.Client) *ListSubjectConsentSessionsParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"ListSubjectConsentSessionsParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"ListSubjectConsentSessionsParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the list subject consent sessions params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"list",
"subject",
"consent",
"sessions",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/list_subject_consent_sessions_parameters.go#L95-L98 |
134,403 | ory/hydra | sdk/go/hydra/client/admin/list_subject_consent_sessions_parameters.go | WithSubject | func (o *ListSubjectConsentSessionsParams) WithSubject(subject string) *ListSubjectConsentSessionsParams {
o.SetSubject(subject)
return o
} | go | func (o *ListSubjectConsentSessionsParams) WithSubject(subject string) *ListSubjectConsentSessionsParams {
o.SetSubject(subject)
return o
} | [
"func",
"(",
"o",
"*",
"ListSubjectConsentSessionsParams",
")",
"WithSubject",
"(",
"subject",
"string",
")",
"*",
"ListSubjectConsentSessionsParams",
"{",
"o",
".",
"SetSubject",
"(",
"subject",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithSubject adds the subject to the list subject consent sessions params | [
"WithSubject",
"adds",
"the",
"subject",
"to",
"the",
"list",
"subject",
"consent",
"sessions",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/list_subject_consent_sessions_parameters.go#L106-L109 |
134,404 | ory/hydra | sdk/go/hydra/models/swaggeroauth2_token_parameters.go | Validate | func (m *Swaggeroauth2TokenParameters) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateGrantType(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | func (m *Swaggeroauth2TokenParameters) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateGrantType(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
"func",
"(",
"m",
"*",
"Swaggeroauth2TokenParameters",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateGrantType",
"(",
"formats",
")",
";",
"er... | // Validate validates this swaggeroauth2 token parameters | [
"Validate",
"validates",
"this",
"swaggeroauth2",
"token",
"parameters"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/swaggeroauth2_token_parameters.go#L35-L46 |
134,405 | ory/hydra | sdk/go/hydra/client/admin/get_login_request_parameters.go | WithTimeout | func (o *GetLoginRequestParams) WithTimeout(timeout time.Duration) *GetLoginRequestParams {
o.SetTimeout(timeout)
return o
} | go | func (o *GetLoginRequestParams) WithTimeout(timeout time.Duration) *GetLoginRequestParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"GetLoginRequestParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"GetLoginRequestParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the get login request params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"get",
"login",
"request",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/get_login_request_parameters.go#L73-L76 |
134,406 | ory/hydra | sdk/go/hydra/client/admin/get_login_request_parameters.go | WithContext | func (o *GetLoginRequestParams) WithContext(ctx context.Context) *GetLoginRequestParams {
o.SetContext(ctx)
return o
} | go | func (o *GetLoginRequestParams) WithContext(ctx context.Context) *GetLoginRequestParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"GetLoginRequestParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"GetLoginRequestParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the get login request params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"get",
"login",
"request",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/get_login_request_parameters.go#L84-L87 |
134,407 | ory/hydra | sdk/go/hydra/client/admin/get_login_request_parameters.go | WithHTTPClient | func (o *GetLoginRequestParams) WithHTTPClient(client *http.Client) *GetLoginRequestParams {
o.SetHTTPClient(client)
return o
} | go | func (o *GetLoginRequestParams) WithHTTPClient(client *http.Client) *GetLoginRequestParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"GetLoginRequestParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"GetLoginRequestParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the get login request params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"get",
"login",
"request",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/get_login_request_parameters.go#L95-L98 |
134,408 | ory/hydra | sdk/go/hydra/client/admin/get_login_request_parameters.go | WithLoginChallenge | func (o *GetLoginRequestParams) WithLoginChallenge(loginChallenge string) *GetLoginRequestParams {
o.SetLoginChallenge(loginChallenge)
return o
} | go | func (o *GetLoginRequestParams) WithLoginChallenge(loginChallenge string) *GetLoginRequestParams {
o.SetLoginChallenge(loginChallenge)
return o
} | [
"func",
"(",
"o",
"*",
"GetLoginRequestParams",
")",
"WithLoginChallenge",
"(",
"loginChallenge",
"string",
")",
"*",
"GetLoginRequestParams",
"{",
"o",
".",
"SetLoginChallenge",
"(",
"loginChallenge",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithLoginChallenge adds the loginChallenge to the get login request params | [
"WithLoginChallenge",
"adds",
"the",
"loginChallenge",
"to",
"the",
"get",
"login",
"request",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/get_login_request_parameters.go#L106-L109 |
134,409 | ory/hydra | sdk/go/hydra/client/public/disconnect_user_parameters.go | WithTimeout | func (o *DisconnectUserParams) WithTimeout(timeout time.Duration) *DisconnectUserParams {
o.SetTimeout(timeout)
return o
} | go | func (o *DisconnectUserParams) WithTimeout(timeout time.Duration) *DisconnectUserParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"DisconnectUserParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"DisconnectUserParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the disconnect user params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"disconnect",
"user",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/disconnect_user_parameters.go#L69-L72 |
134,410 | ory/hydra | sdk/go/hydra/client/public/disconnect_user_parameters.go | WithContext | func (o *DisconnectUserParams) WithContext(ctx context.Context) *DisconnectUserParams {
o.SetContext(ctx)
return o
} | go | func (o *DisconnectUserParams) WithContext(ctx context.Context) *DisconnectUserParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"DisconnectUserParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"DisconnectUserParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the disconnect user params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"disconnect",
"user",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/disconnect_user_parameters.go#L80-L83 |
134,411 | ory/hydra | sdk/go/hydra/client/public/disconnect_user_parameters.go | WithHTTPClient | func (o *DisconnectUserParams) WithHTTPClient(client *http.Client) *DisconnectUserParams {
o.SetHTTPClient(client)
return o
} | go | func (o *DisconnectUserParams) WithHTTPClient(client *http.Client) *DisconnectUserParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"DisconnectUserParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"DisconnectUserParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the disconnect user params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"disconnect",
"user",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/disconnect_user_parameters.go#L91-L94 |
134,412 | ory/hydra | sdk/go/hydra/client/public/revoke_o_auth2_token_parameters.go | WithTimeout | func (o *RevokeOAuth2TokenParams) WithTimeout(timeout time.Duration) *RevokeOAuth2TokenParams {
o.SetTimeout(timeout)
return o
} | go | func (o *RevokeOAuth2TokenParams) WithTimeout(timeout time.Duration) *RevokeOAuth2TokenParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"RevokeOAuth2TokenParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"RevokeOAuth2TokenParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the revoke o auth2 token params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"revoke",
"o",
"auth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/revoke_o_auth2_token_parameters.go#L73-L76 |
134,413 | ory/hydra | sdk/go/hydra/client/public/revoke_o_auth2_token_parameters.go | WithContext | func (o *RevokeOAuth2TokenParams) WithContext(ctx context.Context) *RevokeOAuth2TokenParams {
o.SetContext(ctx)
return o
} | go | func (o *RevokeOAuth2TokenParams) WithContext(ctx context.Context) *RevokeOAuth2TokenParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"RevokeOAuth2TokenParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"RevokeOAuth2TokenParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the revoke o auth2 token params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"revoke",
"o",
"auth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/revoke_o_auth2_token_parameters.go#L84-L87 |
134,414 | ory/hydra | sdk/go/hydra/client/public/revoke_o_auth2_token_parameters.go | WithHTTPClient | func (o *RevokeOAuth2TokenParams) WithHTTPClient(client *http.Client) *RevokeOAuth2TokenParams {
o.SetHTTPClient(client)
return o
} | go | func (o *RevokeOAuth2TokenParams) WithHTTPClient(client *http.Client) *RevokeOAuth2TokenParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"RevokeOAuth2TokenParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"RevokeOAuth2TokenParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the revoke o auth2 token params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"revoke",
"o",
"auth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/revoke_o_auth2_token_parameters.go#L95-L98 |
134,415 | ory/hydra | sdk/go/hydra/client/public/revoke_o_auth2_token_parameters.go | WithToken | func (o *RevokeOAuth2TokenParams) WithToken(token string) *RevokeOAuth2TokenParams {
o.SetToken(token)
return o
} | go | func (o *RevokeOAuth2TokenParams) WithToken(token string) *RevokeOAuth2TokenParams {
o.SetToken(token)
return o
} | [
"func",
"(",
"o",
"*",
"RevokeOAuth2TokenParams",
")",
"WithToken",
"(",
"token",
"string",
")",
"*",
"RevokeOAuth2TokenParams",
"{",
"o",
".",
"SetToken",
"(",
"token",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithToken adds the token to the revoke o auth2 token params | [
"WithToken",
"adds",
"the",
"token",
"to",
"the",
"revoke",
"o",
"auth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/revoke_o_auth2_token_parameters.go#L106-L109 |
134,416 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_set_parameters.go | WithTimeout | func (o *UpdateJSONWebKeySetParams) WithTimeout(timeout time.Duration) *UpdateJSONWebKeySetParams {
o.SetTimeout(timeout)
return o
} | go | func (o *UpdateJSONWebKeySetParams) WithTimeout(timeout time.Duration) *UpdateJSONWebKeySetParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeySetParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"UpdateJSONWebKeySetParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the update Json web key set params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"update",
"Json",
"web",
"key",
"set",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_set_parameters.go#L80-L83 |
134,417 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_set_parameters.go | WithContext | func (o *UpdateJSONWebKeySetParams) WithContext(ctx context.Context) *UpdateJSONWebKeySetParams {
o.SetContext(ctx)
return o
} | go | func (o *UpdateJSONWebKeySetParams) WithContext(ctx context.Context) *UpdateJSONWebKeySetParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeySetParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"UpdateJSONWebKeySetParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the update Json web key set params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"update",
"Json",
"web",
"key",
"set",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_set_parameters.go#L91-L94 |
134,418 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_set_parameters.go | WithHTTPClient | func (o *UpdateJSONWebKeySetParams) WithHTTPClient(client *http.Client) *UpdateJSONWebKeySetParams {
o.SetHTTPClient(client)
return o
} | go | func (o *UpdateJSONWebKeySetParams) WithHTTPClient(client *http.Client) *UpdateJSONWebKeySetParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeySetParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"UpdateJSONWebKeySetParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the update Json web key set params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"update",
"Json",
"web",
"key",
"set",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_set_parameters.go#L102-L105 |
134,419 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_set_parameters.go | WithBody | func (o *UpdateJSONWebKeySetParams) WithBody(body *models.SwaggerJSONWebKeySet) *UpdateJSONWebKeySetParams {
o.SetBody(body)
return o
} | go | func (o *UpdateJSONWebKeySetParams) WithBody(body *models.SwaggerJSONWebKeySet) *UpdateJSONWebKeySetParams {
o.SetBody(body)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeySetParams",
")",
"WithBody",
"(",
"body",
"*",
"models",
".",
"SwaggerJSONWebKeySet",
")",
"*",
"UpdateJSONWebKeySetParams",
"{",
"o",
".",
"SetBody",
"(",
"body",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithBody adds the body to the update Json web key set params | [
"WithBody",
"adds",
"the",
"body",
"to",
"the",
"update",
"Json",
"web",
"key",
"set",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_set_parameters.go#L113-L116 |
134,420 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_set_parameters.go | WithSet | func (o *UpdateJSONWebKeySetParams) WithSet(set string) *UpdateJSONWebKeySetParams {
o.SetSet(set)
return o
} | go | func (o *UpdateJSONWebKeySetParams) WithSet(set string) *UpdateJSONWebKeySetParams {
o.SetSet(set)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeySetParams",
")",
"WithSet",
"(",
"set",
"string",
")",
"*",
"UpdateJSONWebKeySetParams",
"{",
"o",
".",
"SetSet",
"(",
"set",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithSet adds the set to the update Json web key set params | [
"WithSet",
"adds",
"the",
"set",
"to",
"the",
"update",
"Json",
"web",
"key",
"set",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_set_parameters.go#L124-L127 |
134,421 | ory/hydra | sdk/go/hydra/models/handled_login_request.go | Validate | func (m *HandledLoginRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSubject(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | func (m *HandledLoginRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSubject(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
"func",
"(",
"m",
"*",
"HandledLoginRequest",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateSubject",
"(",
"formats",
")",
";",
"err",
"!=",... | // Validate validates this handled login request | [
"Validate",
"validates",
"this",
"handled",
"login",
"request"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/handled_login_request.go#L63-L74 |
134,422 | ory/hydra | sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go | WithTimeout | func (o *IntrospectOAuth2TokenParams) WithTimeout(timeout time.Duration) *IntrospectOAuth2TokenParams {
o.SetTimeout(timeout)
return o
} | go | func (o *IntrospectOAuth2TokenParams) WithTimeout(timeout time.Duration) *IntrospectOAuth2TokenParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"IntrospectOAuth2TokenParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"IntrospectOAuth2TokenParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the introspect o auth2 token params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"introspect",
"o",
"auth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go#L85-L88 |
134,423 | ory/hydra | sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go | WithContext | func (o *IntrospectOAuth2TokenParams) WithContext(ctx context.Context) *IntrospectOAuth2TokenParams {
o.SetContext(ctx)
return o
} | go | func (o *IntrospectOAuth2TokenParams) WithContext(ctx context.Context) *IntrospectOAuth2TokenParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"IntrospectOAuth2TokenParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"IntrospectOAuth2TokenParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the introspect o auth2 token params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"introspect",
"o",
"auth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go#L96-L99 |
134,424 | ory/hydra | sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go | WithHTTPClient | func (o *IntrospectOAuth2TokenParams) WithHTTPClient(client *http.Client) *IntrospectOAuth2TokenParams {
o.SetHTTPClient(client)
return o
} | go | func (o *IntrospectOAuth2TokenParams) WithHTTPClient(client *http.Client) *IntrospectOAuth2TokenParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"IntrospectOAuth2TokenParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"IntrospectOAuth2TokenParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the introspect o auth2 token params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"introspect",
"o",
"auth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go#L107-L110 |
134,425 | ory/hydra | sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go | WithScope | func (o *IntrospectOAuth2TokenParams) WithScope(scope *string) *IntrospectOAuth2TokenParams {
o.SetScope(scope)
return o
} | go | func (o *IntrospectOAuth2TokenParams) WithScope(scope *string) *IntrospectOAuth2TokenParams {
o.SetScope(scope)
return o
} | [
"func",
"(",
"o",
"*",
"IntrospectOAuth2TokenParams",
")",
"WithScope",
"(",
"scope",
"*",
"string",
")",
"*",
"IntrospectOAuth2TokenParams",
"{",
"o",
".",
"SetScope",
"(",
"scope",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithScope adds the scope to the introspect o auth2 token params | [
"WithScope",
"adds",
"the",
"scope",
"to",
"the",
"introspect",
"o",
"auth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go#L118-L121 |
134,426 | ory/hydra | sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go | WithToken | func (o *IntrospectOAuth2TokenParams) WithToken(token string) *IntrospectOAuth2TokenParams {
o.SetToken(token)
return o
} | go | func (o *IntrospectOAuth2TokenParams) WithToken(token string) *IntrospectOAuth2TokenParams {
o.SetToken(token)
return o
} | [
"func",
"(",
"o",
"*",
"IntrospectOAuth2TokenParams",
")",
"WithToken",
"(",
"token",
"string",
")",
"*",
"IntrospectOAuth2TokenParams",
"{",
"o",
".",
"SetToken",
"(",
"token",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithToken adds the token to the introspect o auth2 token params | [
"WithToken",
"adds",
"the",
"token",
"to",
"the",
"introspect",
"o",
"auth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/introspect_o_auth2_token_parameters.go#L129-L132 |
134,427 | ory/hydra | sdk/go/hydra/models/create_request.go | Validate | func (m *CreateRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAlgorithm(formats); err != nil {
res = append(res, err)
}
if err := m.validateKeyID(formats); err != nil {
res = append(res, err)
}
if err := m.validateUse(formats); err != nil {
res = append(res, err)
... | go | func (m *CreateRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAlgorithm(formats); err != nil {
res = append(res, err)
}
if err := m.validateKeyID(formats); err != nil {
res = append(res, err)
}
if err := m.validateUse(formats); err != nil {
res = append(res, err)
... | [
"func",
"(",
"m",
"*",
"CreateRequest",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateAlgorithm",
"(",
"formats",
")",
";",
"err",
"!=",
"... | // Validate validates this create request | [
"Validate",
"validates",
"this",
"create",
"request"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/create_request.go#L37-L56 |
134,428 | ory/hydra | sdk/go/hydra/client/public/well_known_parameters.go | WithTimeout | func (o *WellKnownParams) WithTimeout(timeout time.Duration) *WellKnownParams {
o.SetTimeout(timeout)
return o
} | go | func (o *WellKnownParams) WithTimeout(timeout time.Duration) *WellKnownParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"WellKnownParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"WellKnownParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the well known params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"well",
"known",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/well_known_parameters.go#L69-L72 |
134,429 | ory/hydra | sdk/go/hydra/client/public/well_known_parameters.go | WithContext | func (o *WellKnownParams) WithContext(ctx context.Context) *WellKnownParams {
o.SetContext(ctx)
return o
} | go | func (o *WellKnownParams) WithContext(ctx context.Context) *WellKnownParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"WellKnownParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"WellKnownParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the well known params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"well",
"known",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/well_known_parameters.go#L80-L83 |
134,430 | ory/hydra | sdk/go/hydra/client/public/well_known_parameters.go | WithHTTPClient | func (o *WellKnownParams) WithHTTPClient(client *http.Client) *WellKnownParams {
o.SetHTTPClient(client)
return o
} | go | func (o *WellKnownParams) WithHTTPClient(client *http.Client) *WellKnownParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"WellKnownParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"WellKnownParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the well known params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"well",
"known",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/well_known_parameters.go#L91-L94 |
134,431 | ory/hydra | sdk/go/hydra/models/introspection.go | Validate | func (m *Introspection) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateActive(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | func (m *Introspection) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateActive(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
"func",
"(",
"m",
"*",
"Introspection",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateActive",
"(",
"formats",
")",
";",
"err",
"!=",
"nil... | // Validate validates this introspection | [
"Validate",
"validates",
"this",
"introspection"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/introspection.go#L83-L94 |
134,432 | ory/hydra | sdk/go/hydra/models/swagger_json_web_key.go | Validate | func (m *SwaggerJSONWebKey) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAlg(formats); err != nil {
res = append(res, err)
}
if err := m.validateKid(formats); err != nil {
res = append(res, err)
}
if err := m.validateKty(formats); err != nil {
res = append(res, err)
}
... | go | func (m *SwaggerJSONWebKey) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAlg(formats); err != nil {
res = append(res, err)
}
if err := m.validateKid(formats); err != nil {
res = append(res, err)
}
if err := m.validateKty(formats); err != nil {
res = append(res, err)
}
... | [
"func",
"(",
"m",
"*",
"SwaggerJSONWebKey",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateAlg",
"(",
"formats",
")",
";",
"err",
"!=",
"ni... | // Validate validates this swagger JSON web key | [
"Validate",
"validates",
"this",
"swagger",
"JSON",
"web",
"key"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/swagger_json_web_key.go#L102-L125 |
134,433 | ory/hydra | sdk/go/hydra/models/swagger_json_web_key_set.go | Validate | func (m *SwaggerJSONWebKeySet) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateKeys(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | func (m *SwaggerJSONWebKeySet) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateKeys(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
"func",
"(",
"m",
"*",
"SwaggerJSONWebKeySet",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateKeys",
"(",
"formats",
")",
";",
"err",
"!=",
... | // Validate validates this swagger JSON web key set | [
"Validate",
"validates",
"this",
"swagger",
"JSON",
"web",
"key",
"set"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/swagger_json_web_key_set.go#L30-L41 |
134,434 | ory/hydra | cmd/cli/handler_helper.go | newEncryptionKey | func newEncryptionKey(cmd *cobra.Command, client *http.Client) (ek encrypta.EncryptionKey, encryptSecret bool, err error) {
if client == nil {
client = http.DefaultClient
}
pgpKey := flagx.MustGetString(cmd, "pgp-key")
pgpKeyURL := flagx.MustGetString(cmd, "pgp-key-url")
keybaseUsername := flagx.MustGetString(c... | go | func newEncryptionKey(cmd *cobra.Command, client *http.Client) (ek encrypta.EncryptionKey, encryptSecret bool, err error) {
if client == nil {
client = http.DefaultClient
}
pgpKey := flagx.MustGetString(cmd, "pgp-key")
pgpKeyURL := flagx.MustGetString(cmd, "pgp-key-url")
keybaseUsername := flagx.MustGetString(c... | [
"func",
"newEncryptionKey",
"(",
"cmd",
"*",
"cobra",
".",
"Command",
",",
"client",
"*",
"http",
".",
"Client",
")",
"(",
"ek",
"encrypta",
".",
"EncryptionKey",
",",
"encryptSecret",
"bool",
",",
"err",
"error",
")",
"{",
"if",
"client",
"==",
"nil",
... | // newEncryptionKey for client secret | [
"newEncryptionKey",
"for",
"client",
"secret"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/cmd/cli/handler_helper.go#L128-L156 |
134,435 | ory/hydra | sdk/go/hydra/client/admin/revoke_consent_sessions_parameters.go | WithTimeout | func (o *RevokeConsentSessionsParams) WithTimeout(timeout time.Duration) *RevokeConsentSessionsParams {
o.SetTimeout(timeout)
return o
} | go | func (o *RevokeConsentSessionsParams) WithTimeout(timeout time.Duration) *RevokeConsentSessionsParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"RevokeConsentSessionsParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"RevokeConsentSessionsParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the revoke consent sessions params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"revoke",
"consent",
"sessions",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/revoke_consent_sessions_parameters.go#L81-L84 |
134,436 | ory/hydra | sdk/go/hydra/client/admin/revoke_consent_sessions_parameters.go | WithContext | func (o *RevokeConsentSessionsParams) WithContext(ctx context.Context) *RevokeConsentSessionsParams {
o.SetContext(ctx)
return o
} | go | func (o *RevokeConsentSessionsParams) WithContext(ctx context.Context) *RevokeConsentSessionsParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"RevokeConsentSessionsParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"RevokeConsentSessionsParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the revoke consent sessions params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"revoke",
"consent",
"sessions",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/revoke_consent_sessions_parameters.go#L92-L95 |
134,437 | ory/hydra | sdk/go/hydra/client/admin/revoke_consent_sessions_parameters.go | WithHTTPClient | func (o *RevokeConsentSessionsParams) WithHTTPClient(client *http.Client) *RevokeConsentSessionsParams {
o.SetHTTPClient(client)
return o
} | go | func (o *RevokeConsentSessionsParams) WithHTTPClient(client *http.Client) *RevokeConsentSessionsParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"RevokeConsentSessionsParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"RevokeConsentSessionsParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the revoke consent sessions params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"revoke",
"consent",
"sessions",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/revoke_consent_sessions_parameters.go#L103-L106 |
134,438 | ory/hydra | sdk/go/hydra/client/admin/revoke_consent_sessions_parameters.go | WithClient | func (o *RevokeConsentSessionsParams) WithClient(client *string) *RevokeConsentSessionsParams {
o.SetClient(client)
return o
} | go | func (o *RevokeConsentSessionsParams) WithClient(client *string) *RevokeConsentSessionsParams {
o.SetClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"RevokeConsentSessionsParams",
")",
"WithClient",
"(",
"client",
"*",
"string",
")",
"*",
"RevokeConsentSessionsParams",
"{",
"o",
".",
"SetClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithClient adds the client to the revoke consent sessions params | [
"WithClient",
"adds",
"the",
"client",
"to",
"the",
"revoke",
"consent",
"sessions",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/revoke_consent_sessions_parameters.go#L114-L117 |
134,439 | ory/hydra | sdk/go/hydra/client/admin/revoke_consent_sessions_parameters.go | WithSubject | func (o *RevokeConsentSessionsParams) WithSubject(subject string) *RevokeConsentSessionsParams {
o.SetSubject(subject)
return o
} | go | func (o *RevokeConsentSessionsParams) WithSubject(subject string) *RevokeConsentSessionsParams {
o.SetSubject(subject)
return o
} | [
"func",
"(",
"o",
"*",
"RevokeConsentSessionsParams",
")",
"WithSubject",
"(",
"subject",
"string",
")",
"*",
"RevokeConsentSessionsParams",
"{",
"o",
".",
"SetSubject",
"(",
"subject",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithSubject adds the subject to the revoke consent sessions params | [
"WithSubject",
"adds",
"the",
"subject",
"to",
"the",
"revoke",
"consent",
"sessions",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/revoke_consent_sessions_parameters.go#L125-L128 |
134,440 | ory/hydra | sdk/go/hydra/client/admin/list_o_auth2_clients_parameters.go | WithTimeout | func (o *ListOAuth2ClientsParams) WithTimeout(timeout time.Duration) *ListOAuth2ClientsParams {
o.SetTimeout(timeout)
return o
} | go | func (o *ListOAuth2ClientsParams) WithTimeout(timeout time.Duration) *ListOAuth2ClientsParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"ListOAuth2ClientsParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"ListOAuth2ClientsParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the list o auth2 clients params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"list",
"o",
"auth2",
"clients",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/list_o_auth2_clients_parameters.go#L82-L85 |
134,441 | ory/hydra | sdk/go/hydra/client/admin/list_o_auth2_clients_parameters.go | WithContext | func (o *ListOAuth2ClientsParams) WithContext(ctx context.Context) *ListOAuth2ClientsParams {
o.SetContext(ctx)
return o
} | go | func (o *ListOAuth2ClientsParams) WithContext(ctx context.Context) *ListOAuth2ClientsParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"ListOAuth2ClientsParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"ListOAuth2ClientsParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the list o auth2 clients params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"list",
"o",
"auth2",
"clients",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/list_o_auth2_clients_parameters.go#L93-L96 |
134,442 | ory/hydra | sdk/go/hydra/client/admin/list_o_auth2_clients_parameters.go | WithHTTPClient | func (o *ListOAuth2ClientsParams) WithHTTPClient(client *http.Client) *ListOAuth2ClientsParams {
o.SetHTTPClient(client)
return o
} | go | func (o *ListOAuth2ClientsParams) WithHTTPClient(client *http.Client) *ListOAuth2ClientsParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"ListOAuth2ClientsParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"ListOAuth2ClientsParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the list o auth2 clients params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"list",
"o",
"auth2",
"clients",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/list_o_auth2_clients_parameters.go#L104-L107 |
134,443 | ory/hydra | sdk/go/hydra/client/admin/list_o_auth2_clients_parameters.go | WithLimit | func (o *ListOAuth2ClientsParams) WithLimit(limit *int64) *ListOAuth2ClientsParams {
o.SetLimit(limit)
return o
} | go | func (o *ListOAuth2ClientsParams) WithLimit(limit *int64) *ListOAuth2ClientsParams {
o.SetLimit(limit)
return o
} | [
"func",
"(",
"o",
"*",
"ListOAuth2ClientsParams",
")",
"WithLimit",
"(",
"limit",
"*",
"int64",
")",
"*",
"ListOAuth2ClientsParams",
"{",
"o",
".",
"SetLimit",
"(",
"limit",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithLimit adds the limit to the list o auth2 clients params | [
"WithLimit",
"adds",
"the",
"limit",
"to",
"the",
"list",
"o",
"auth2",
"clients",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/list_o_auth2_clients_parameters.go#L115-L118 |
134,444 | ory/hydra | sdk/go/hydra/client/admin/list_o_auth2_clients_parameters.go | WithOffset | func (o *ListOAuth2ClientsParams) WithOffset(offset *int64) *ListOAuth2ClientsParams {
o.SetOffset(offset)
return o
} | go | func (o *ListOAuth2ClientsParams) WithOffset(offset *int64) *ListOAuth2ClientsParams {
o.SetOffset(offset)
return o
} | [
"func",
"(",
"o",
"*",
"ListOAuth2ClientsParams",
")",
"WithOffset",
"(",
"offset",
"*",
"int64",
")",
"*",
"ListOAuth2ClientsParams",
"{",
"o",
".",
"SetOffset",
"(",
"offset",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithOffset adds the offset to the list o auth2 clients params | [
"WithOffset",
"adds",
"the",
"offset",
"to",
"the",
"list",
"o",
"auth2",
"clients",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/list_o_auth2_clients_parameters.go#L126-L129 |
134,445 | ory/hydra | sdk/go/hydra/models/handled_consent_request.go | Validate | func (m *HandledConsentRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSession(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | func (m *HandledConsentRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSession(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
"func",
"(",
"m",
"*",
"HandledConsentRequest",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateSession",
"(",
"formats",
")",
";",
"err",
"!=... | // Validate validates this handled consent request | [
"Validate",
"validates",
"this",
"handled",
"consent",
"request"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/handled_consent_request.go#L38-L49 |
134,446 | ory/hydra | sdk/go/hydra/client/ory_hydra_client.go | New | func New(transport runtime.ClientTransport, formats strfmt.Registry) *OryHydra {
// ensure nullable parameters have default
if formats == nil {
formats = strfmt.Default
}
cli := new(OryHydra)
cli.Transport = transport
cli.Admin = admin.New(transport, formats)
cli.Health = health.New(transport, formats)
cl... | go | func New(transport runtime.ClientTransport, formats strfmt.Registry) *OryHydra {
// ensure nullable parameters have default
if formats == nil {
formats = strfmt.Default
}
cli := new(OryHydra)
cli.Transport = transport
cli.Admin = admin.New(transport, formats)
cli.Health = health.New(transport, formats)
cl... | [
"func",
"New",
"(",
"transport",
"runtime",
".",
"ClientTransport",
",",
"formats",
"strfmt",
".",
"Registry",
")",
"*",
"OryHydra",
"{",
"// ensure nullable parameters have default",
"if",
"formats",
"==",
"nil",
"{",
"formats",
"=",
"strfmt",
".",
"Default",
"... | // New creates a new ory hydra client | [
"New",
"creates",
"a",
"new",
"ory",
"hydra",
"client"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/ory_hydra_client.go#L54-L72 |
134,447 | ory/hydra | sdk/go/hydra/client/ory_hydra_client.go | WithHost | func (cfg *TransportConfig) WithHost(host string) *TransportConfig {
cfg.Host = host
return cfg
} | go | func (cfg *TransportConfig) WithHost(host string) *TransportConfig {
cfg.Host = host
return cfg
} | [
"func",
"(",
"cfg",
"*",
"TransportConfig",
")",
"WithHost",
"(",
"host",
"string",
")",
"*",
"TransportConfig",
"{",
"cfg",
".",
"Host",
"=",
"host",
"\n",
"return",
"cfg",
"\n",
"}"
] | // WithHost overrides the default host,
// provided by the meta section of the spec file. | [
"WithHost",
"overrides",
"the",
"default",
"host",
"provided",
"by",
"the",
"meta",
"section",
"of",
"the",
"spec",
"file",
"."
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/ory_hydra_client.go#L94-L97 |
134,448 | ory/hydra | sdk/go/hydra/client/ory_hydra_client.go | WithBasePath | func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig {
cfg.BasePath = basePath
return cfg
} | go | func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig {
cfg.BasePath = basePath
return cfg
} | [
"func",
"(",
"cfg",
"*",
"TransportConfig",
")",
"WithBasePath",
"(",
"basePath",
"string",
")",
"*",
"TransportConfig",
"{",
"cfg",
".",
"BasePath",
"=",
"basePath",
"\n",
"return",
"cfg",
"\n",
"}"
] | // WithBasePath overrides the default basePath,
// provided by the meta section of the spec file. | [
"WithBasePath",
"overrides",
"the",
"default",
"basePath",
"provided",
"by",
"the",
"meta",
"section",
"of",
"the",
"spec",
"file",
"."
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/ory_hydra_client.go#L101-L104 |
134,449 | ory/hydra | sdk/go/hydra/client/ory_hydra_client.go | WithSchemes | func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
cfg.Schemes = schemes
return cfg
} | go | func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
cfg.Schemes = schemes
return cfg
} | [
"func",
"(",
"cfg",
"*",
"TransportConfig",
")",
"WithSchemes",
"(",
"schemes",
"[",
"]",
"string",
")",
"*",
"TransportConfig",
"{",
"cfg",
".",
"Schemes",
"=",
"schemes",
"\n",
"return",
"cfg",
"\n",
"}"
] | // WithSchemes overrides the default schemes,
// provided by the meta section of the spec file. | [
"WithSchemes",
"overrides",
"the",
"default",
"schemes",
"provided",
"by",
"the",
"meta",
"section",
"of",
"the",
"spec",
"file",
"."
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/ory_hydra_client.go#L108-L111 |
134,450 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_parameters.go | WithTimeout | func (o *UpdateJSONWebKeyParams) WithTimeout(timeout time.Duration) *UpdateJSONWebKeyParams {
o.SetTimeout(timeout)
return o
} | go | func (o *UpdateJSONWebKeyParams) WithTimeout(timeout time.Duration) *UpdateJSONWebKeyParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeyParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"UpdateJSONWebKeyParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the update Json web key params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"update",
"Json",
"web",
"key",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_parameters.go#L85-L88 |
134,451 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_parameters.go | WithContext | func (o *UpdateJSONWebKeyParams) WithContext(ctx context.Context) *UpdateJSONWebKeyParams {
o.SetContext(ctx)
return o
} | go | func (o *UpdateJSONWebKeyParams) WithContext(ctx context.Context) *UpdateJSONWebKeyParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeyParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"UpdateJSONWebKeyParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the update Json web key params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"update",
"Json",
"web",
"key",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_parameters.go#L96-L99 |
134,452 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_parameters.go | WithHTTPClient | func (o *UpdateJSONWebKeyParams) WithHTTPClient(client *http.Client) *UpdateJSONWebKeyParams {
o.SetHTTPClient(client)
return o
} | go | func (o *UpdateJSONWebKeyParams) WithHTTPClient(client *http.Client) *UpdateJSONWebKeyParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeyParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"UpdateJSONWebKeyParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the update Json web key params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"update",
"Json",
"web",
"key",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_parameters.go#L107-L110 |
134,453 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_parameters.go | WithBody | func (o *UpdateJSONWebKeyParams) WithBody(body *models.SwaggerJSONWebKey) *UpdateJSONWebKeyParams {
o.SetBody(body)
return o
} | go | func (o *UpdateJSONWebKeyParams) WithBody(body *models.SwaggerJSONWebKey) *UpdateJSONWebKeyParams {
o.SetBody(body)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeyParams",
")",
"WithBody",
"(",
"body",
"*",
"models",
".",
"SwaggerJSONWebKey",
")",
"*",
"UpdateJSONWebKeyParams",
"{",
"o",
".",
"SetBody",
"(",
"body",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithBody adds the body to the update Json web key params | [
"WithBody",
"adds",
"the",
"body",
"to",
"the",
"update",
"Json",
"web",
"key",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_parameters.go#L118-L121 |
134,454 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_parameters.go | WithKid | func (o *UpdateJSONWebKeyParams) WithKid(kid string) *UpdateJSONWebKeyParams {
o.SetKid(kid)
return o
} | go | func (o *UpdateJSONWebKeyParams) WithKid(kid string) *UpdateJSONWebKeyParams {
o.SetKid(kid)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeyParams",
")",
"WithKid",
"(",
"kid",
"string",
")",
"*",
"UpdateJSONWebKeyParams",
"{",
"o",
".",
"SetKid",
"(",
"kid",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithKid adds the kid to the update Json web key params | [
"WithKid",
"adds",
"the",
"kid",
"to",
"the",
"update",
"Json",
"web",
"key",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_parameters.go#L129-L132 |
134,455 | ory/hydra | sdk/go/hydra/client/admin/update_json_web_key_parameters.go | WithSet | func (o *UpdateJSONWebKeyParams) WithSet(set string) *UpdateJSONWebKeyParams {
o.SetSet(set)
return o
} | go | func (o *UpdateJSONWebKeyParams) WithSet(set string) *UpdateJSONWebKeyParams {
o.SetSet(set)
return o
} | [
"func",
"(",
"o",
"*",
"UpdateJSONWebKeyParams",
")",
"WithSet",
"(",
"set",
"string",
")",
"*",
"UpdateJSONWebKeyParams",
"{",
"o",
".",
"SetSet",
"(",
"set",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithSet adds the set to the update Json web key params | [
"WithSet",
"adds",
"the",
"set",
"to",
"the",
"update",
"Json",
"web",
"key",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/admin/update_json_web_key_parameters.go#L140-L143 |
134,456 | ory/hydra | sdk/go/hydra/client/public/oauth2_token_parameters.go | WithTimeout | func (o *Oauth2TokenParams) WithTimeout(timeout time.Duration) *Oauth2TokenParams {
o.SetTimeout(timeout)
return o
} | go | func (o *Oauth2TokenParams) WithTimeout(timeout time.Duration) *Oauth2TokenParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"Oauth2TokenParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"Oauth2TokenParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the oauth2 token params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"oauth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/oauth2_token_parameters.go#L79-L82 |
134,457 | ory/hydra | sdk/go/hydra/client/public/oauth2_token_parameters.go | WithContext | func (o *Oauth2TokenParams) WithContext(ctx context.Context) *Oauth2TokenParams {
o.SetContext(ctx)
return o
} | go | func (o *Oauth2TokenParams) WithContext(ctx context.Context) *Oauth2TokenParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"Oauth2TokenParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"Oauth2TokenParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the oauth2 token params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"oauth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/oauth2_token_parameters.go#L90-L93 |
134,458 | ory/hydra | sdk/go/hydra/client/public/oauth2_token_parameters.go | WithHTTPClient | func (o *Oauth2TokenParams) WithHTTPClient(client *http.Client) *Oauth2TokenParams {
o.SetHTTPClient(client)
return o
} | go | func (o *Oauth2TokenParams) WithHTTPClient(client *http.Client) *Oauth2TokenParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"Oauth2TokenParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"Oauth2TokenParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the oauth2 token params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"oauth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/oauth2_token_parameters.go#L101-L104 |
134,459 | ory/hydra | sdk/go/hydra/client/public/oauth2_token_parameters.go | WithClientID | func (o *Oauth2TokenParams) WithClientID(clientID *string) *Oauth2TokenParams {
o.SetClientID(clientID)
return o
} | go | func (o *Oauth2TokenParams) WithClientID(clientID *string) *Oauth2TokenParams {
o.SetClientID(clientID)
return o
} | [
"func",
"(",
"o",
"*",
"Oauth2TokenParams",
")",
"WithClientID",
"(",
"clientID",
"*",
"string",
")",
"*",
"Oauth2TokenParams",
"{",
"o",
".",
"SetClientID",
"(",
"clientID",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithClientID adds the clientID to the oauth2 token params | [
"WithClientID",
"adds",
"the",
"clientID",
"to",
"the",
"oauth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/oauth2_token_parameters.go#L112-L115 |
134,460 | ory/hydra | sdk/go/hydra/client/public/oauth2_token_parameters.go | WithCode | func (o *Oauth2TokenParams) WithCode(code *string) *Oauth2TokenParams {
o.SetCode(code)
return o
} | go | func (o *Oauth2TokenParams) WithCode(code *string) *Oauth2TokenParams {
o.SetCode(code)
return o
} | [
"func",
"(",
"o",
"*",
"Oauth2TokenParams",
")",
"WithCode",
"(",
"code",
"*",
"string",
")",
"*",
"Oauth2TokenParams",
"{",
"o",
".",
"SetCode",
"(",
"code",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithCode adds the code to the oauth2 token params | [
"WithCode",
"adds",
"the",
"code",
"to",
"the",
"oauth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/oauth2_token_parameters.go#L123-L126 |
134,461 | ory/hydra | sdk/go/hydra/client/public/oauth2_token_parameters.go | WithGrantType | func (o *Oauth2TokenParams) WithGrantType(grantType string) *Oauth2TokenParams {
o.SetGrantType(grantType)
return o
} | go | func (o *Oauth2TokenParams) WithGrantType(grantType string) *Oauth2TokenParams {
o.SetGrantType(grantType)
return o
} | [
"func",
"(",
"o",
"*",
"Oauth2TokenParams",
")",
"WithGrantType",
"(",
"grantType",
"string",
")",
"*",
"Oauth2TokenParams",
"{",
"o",
".",
"SetGrantType",
"(",
"grantType",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithGrantType adds the grantType to the oauth2 token params | [
"WithGrantType",
"adds",
"the",
"grantType",
"to",
"the",
"oauth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/oauth2_token_parameters.go#L134-L137 |
134,462 | ory/hydra | sdk/go/hydra/client/public/oauth2_token_parameters.go | WithRedirectURI | func (o *Oauth2TokenParams) WithRedirectURI(redirectURI *string) *Oauth2TokenParams {
o.SetRedirectURI(redirectURI)
return o
} | go | func (o *Oauth2TokenParams) WithRedirectURI(redirectURI *string) *Oauth2TokenParams {
o.SetRedirectURI(redirectURI)
return o
} | [
"func",
"(",
"o",
"*",
"Oauth2TokenParams",
")",
"WithRedirectURI",
"(",
"redirectURI",
"*",
"string",
")",
"*",
"Oauth2TokenParams",
"{",
"o",
".",
"SetRedirectURI",
"(",
"redirectURI",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithRedirectURI adds the redirectURI to the oauth2 token params | [
"WithRedirectURI",
"adds",
"the",
"redirectURI",
"to",
"the",
"oauth2",
"token",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/oauth2_token_parameters.go#L145-L148 |
134,463 | ory/hydra | driver/registry_memory.go | WithOAuth2Provider | func (m *RegistryMemory) WithOAuth2Provider(f fosite.OAuth2Provider) *RegistryMemory {
m.RegistryBase.fop = f
return m
} | go | func (m *RegistryMemory) WithOAuth2Provider(f fosite.OAuth2Provider) *RegistryMemory {
m.RegistryBase.fop = f
return m
} | [
"func",
"(",
"m",
"*",
"RegistryMemory",
")",
"WithOAuth2Provider",
"(",
"f",
"fosite",
".",
"OAuth2Provider",
")",
"*",
"RegistryMemory",
"{",
"m",
".",
"RegistryBase",
".",
"fop",
"=",
"f",
"\n",
"return",
"m",
"\n",
"}"
] | // WithOAuth2Provider forces an oauth2 provider which is only used for testing. | [
"WithOAuth2Provider",
"forces",
"an",
"oauth2",
"provider",
"which",
"is",
"only",
"used",
"for",
"testing",
"."
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/driver/registry_memory.go#L33-L36 |
134,464 | ory/hydra | driver/registry_memory.go | WithConsentStrategy | func (m *RegistryMemory) WithConsentStrategy(c consent.Strategy) *RegistryMemory {
m.RegistryBase.cos = c
return m
} | go | func (m *RegistryMemory) WithConsentStrategy(c consent.Strategy) *RegistryMemory {
m.RegistryBase.cos = c
return m
} | [
"func",
"(",
"m",
"*",
"RegistryMemory",
")",
"WithConsentStrategy",
"(",
"c",
"consent",
".",
"Strategy",
")",
"*",
"RegistryMemory",
"{",
"m",
".",
"RegistryBase",
".",
"cos",
"=",
"c",
"\n",
"return",
"m",
"\n",
"}"
] | // WithConsentStrategy forces a consent strategy which is only used for testing. | [
"WithConsentStrategy",
"forces",
"a",
"consent",
"strategy",
"which",
"is",
"only",
"used",
"for",
"testing",
"."
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/driver/registry_memory.go#L39-L42 |
134,465 | ory/hydra | sdk/go/hydra/models/client.go | Validate | func (m *Client) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCreatedAt(formats); err != nil {
res = append(res, err)
}
if err := m.validateGrantTypes(formats); err != nil {
res = append(res, err)
}
if err := m.validateResponseTypes(formats); err != nil {
res = append(res... | go | func (m *Client) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCreatedAt(formats); err != nil {
res = append(res, err)
}
if err := m.validateGrantTypes(formats); err != nil {
res = append(res, err)
}
if err := m.validateResponseTypes(formats); err != nil {
res = append(res... | [
"func",
"(",
"m",
"*",
"Client",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateCreatedAt",
"(",
"formats",
")",
";",
"err",
"!=",
"nil",
... | // Validate validates this client | [
"Validate",
"validates",
"this",
"client"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/client.go#L169-L200 |
134,466 | ory/hydra | sdk/go/hydra/client/public/oauth_auth_parameters.go | WithTimeout | func (o *OauthAuthParams) WithTimeout(timeout time.Duration) *OauthAuthParams {
o.SetTimeout(timeout)
return o
} | go | func (o *OauthAuthParams) WithTimeout(timeout time.Duration) *OauthAuthParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"OauthAuthParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"OauthAuthParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the oauth auth params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"oauth",
"auth",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/oauth_auth_parameters.go#L69-L72 |
134,467 | ory/hydra | sdk/go/hydra/client/public/oauth_auth_parameters.go | WithContext | func (o *OauthAuthParams) WithContext(ctx context.Context) *OauthAuthParams {
o.SetContext(ctx)
return o
} | go | func (o *OauthAuthParams) WithContext(ctx context.Context) *OauthAuthParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"OauthAuthParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"OauthAuthParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the oauth auth params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"oauth",
"auth",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/oauth_auth_parameters.go#L80-L83 |
134,468 | ory/hydra | sdk/go/hydra/client/public/oauth_auth_parameters.go | WithHTTPClient | func (o *OauthAuthParams) WithHTTPClient(client *http.Client) *OauthAuthParams {
o.SetHTTPClient(client)
return o
} | go | func (o *OauthAuthParams) WithHTTPClient(client *http.Client) *OauthAuthParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"OauthAuthParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"OauthAuthParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the oauth auth params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"oauth",
"auth",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/public/oauth_auth_parameters.go#L91-L94 |
134,469 | ory/hydra | sdk/go/hydra/models/swagger_jwk_set_query.go | Validate | func (m *SwaggerJwkSetQuery) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSet(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | func (m *SwaggerJwkSetQuery) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSet(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
"func",
"(",
"m",
"*",
"SwaggerJwkSetQuery",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateSet",
"(",
"formats",
")",
";",
"err",
"!=",
"n... | // Validate validates this swagger jwk set query | [
"Validate",
"validates",
"this",
"swagger",
"jwk",
"set",
"query"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/swagger_jwk_set_query.go#L27-L38 |
134,470 | ory/hydra | sdk/go/hydra/client/health/is_instance_ready_parameters.go | WithTimeout | func (o *IsInstanceReadyParams) WithTimeout(timeout time.Duration) *IsInstanceReadyParams {
o.SetTimeout(timeout)
return o
} | go | func (o *IsInstanceReadyParams) WithTimeout(timeout time.Duration) *IsInstanceReadyParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"IsInstanceReadyParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"IsInstanceReadyParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the is instance ready params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"is",
"instance",
"ready",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/health/is_instance_ready_parameters.go#L69-L72 |
134,471 | ory/hydra | sdk/go/hydra/client/health/is_instance_ready_parameters.go | WithContext | func (o *IsInstanceReadyParams) WithContext(ctx context.Context) *IsInstanceReadyParams {
o.SetContext(ctx)
return o
} | go | func (o *IsInstanceReadyParams) WithContext(ctx context.Context) *IsInstanceReadyParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"IsInstanceReadyParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"IsInstanceReadyParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the is instance ready params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"is",
"instance",
"ready",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/health/is_instance_ready_parameters.go#L80-L83 |
134,472 | ory/hydra | sdk/go/hydra/client/health/is_instance_ready_parameters.go | WithHTTPClient | func (o *IsInstanceReadyParams) WithHTTPClient(client *http.Client) *IsInstanceReadyParams {
o.SetHTTPClient(client)
return o
} | go | func (o *IsInstanceReadyParams) WithHTTPClient(client *http.Client) *IsInstanceReadyParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"IsInstanceReadyParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"IsInstanceReadyParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the is instance ready params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"is",
"instance",
"ready",
"params"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/client/health/is_instance_ready_parameters.go#L91-L94 |
134,473 | ory/hydra | sdk/go/hydra/models/flush_inactive_o_auth2_tokens_request.go | Validate | func (m *FlushInactiveOAuth2TokensRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateNotAfter(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | go | func (m *FlushInactiveOAuth2TokensRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateNotAfter(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
} | [
"func",
"(",
"m",
"*",
"FlushInactiveOAuth2TokensRequest",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateNotAfter",
"(",
"formats",
")",
";",
... | // Validate validates this flush inactive o auth2 tokens request | [
"Validate",
"validates",
"this",
"flush",
"inactive",
"o",
"auth2",
"tokens",
"request"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/flush_inactive_o_auth2_tokens_request.go#L27-L38 |
134,474 | ory/hydra | sdk/go/hydra/models/consent_request.go | Validate | func (m *ConsentRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateClient(formats); err != nil {
res = append(res, err)
}
if err := m.validateOidcContext(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}... | go | func (m *ConsentRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateClient(formats); err != nil {
res = append(res, err)
}
if err := m.validateOidcContext(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}... | [
"func",
"(",
"m",
"*",
"ConsentRequest",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateClient",
"(",
"formats",
")",
";",
"err",
"!=",
"ni... | // Validate validates this consent request | [
"Validate",
"validates",
"this",
"consent",
"request"
] | 67c246c177446daab64be00ba82b3aea1a546570 | https://github.com/ory/hydra/blob/67c246c177446daab64be00ba82b3aea1a546570/sdk/go/hydra/models/consent_request.go#L68-L83 |
134,475 | micro/micro | cmd/cmd.go | Init | func Init(options ...micro.Option) {
Setup(cmd.App(), options...)
cmd.Init(
cmd.Name(name),
cmd.Description(description),
cmd.Version(version),
)
} | go | func Init(options ...micro.Option) {
Setup(cmd.App(), options...)
cmd.Init(
cmd.Name(name),
cmd.Description(description),
cmd.Version(version),
)
} | [
"func",
"Init",
"(",
"options",
"...",
"micro",
".",
"Option",
")",
"{",
"Setup",
"(",
"cmd",
".",
"App",
"(",
")",
",",
"options",
"...",
")",
"\n\n",
"cmd",
".",
"Init",
"(",
"cmd",
".",
"Name",
"(",
"name",
")",
",",
"cmd",
".",
"Description",... | // Init initialised the command line | [
"Init",
"initialised",
"the",
"command",
"line"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/cmd/cmd.go#L146-L154 |
134,476 | micro/micro | cmd/cmd.go | Setup | func Setup(app *ccli.App, options ...micro.Option) {
app.Commands = append(app.Commands, api.Commands(options...)...)
app.Commands = append(app.Commands, bot.Commands()...)
app.Commands = append(app.Commands, cli.Commands()...)
app.Commands = append(app.Commands, proxy.Commands(options...)...)
app.Commands = appen... | go | func Setup(app *ccli.App, options ...micro.Option) {
app.Commands = append(app.Commands, api.Commands(options...)...)
app.Commands = append(app.Commands, bot.Commands()...)
app.Commands = append(app.Commands, cli.Commands()...)
app.Commands = append(app.Commands, proxy.Commands(options...)...)
app.Commands = appen... | [
"func",
"Setup",
"(",
"app",
"*",
"ccli",
".",
"App",
",",
"options",
"...",
"micro",
".",
"Option",
")",
"{",
"app",
".",
"Commands",
"=",
"append",
"(",
"app",
".",
"Commands",
",",
"api",
".",
"Commands",
"(",
"options",
"...",
")",
"...",
")",
... | // Setup sets up a cli.App | [
"Setup",
"sets",
"up",
"a",
"cli",
".",
"App"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/cmd/cmd.go#L157-L168 |
134,477 | micro/micro | bot/plugin.go | Register | func Register(pl plugin.Plugin) error {
for _, p := range plugin.Plugins() {
if p.String() == pl.String() {
return fmt.Errorf("%s registered globally", pl.String())
}
}
return defaultManager.Register(pl)
} | go | func Register(pl plugin.Plugin) error {
for _, p := range plugin.Plugins() {
if p.String() == pl.String() {
return fmt.Errorf("%s registered globally", pl.String())
}
}
return defaultManager.Register(pl)
} | [
"func",
"Register",
"(",
"pl",
"plugin",
".",
"Plugin",
")",
"error",
"{",
"for",
"_",
",",
"p",
":=",
"range",
"plugin",
".",
"Plugins",
"(",
")",
"{",
"if",
"p",
".",
"String",
"(",
")",
"==",
"pl",
".",
"String",
"(",
")",
"{",
"return",
"fm... | // Register registers an bot plugin | [
"Register",
"registers",
"an",
"bot",
"plugin"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/bot/plugin.go#L19-L26 |
134,478 | micro/micro | internal/handler/meta.go | Meta | func Meta(s micro.Service, r router.Router) http.Handler {
return &metaHandler{
s: s,
r: r,
}
} | go | func Meta(s micro.Service, r router.Router) http.Handler {
return &metaHandler{
s: s,
r: r,
}
} | [
"func",
"Meta",
"(",
"s",
"micro",
".",
"Service",
",",
"r",
"router",
".",
"Router",
")",
"http",
".",
"Handler",
"{",
"return",
"&",
"metaHandler",
"{",
"s",
":",
"s",
",",
"r",
":",
"r",
",",
"}",
"\n",
"}"
] | // Meta is a http.Handler that routes based on endpoint metadata | [
"Meta",
"is",
"a",
"http",
".",
"Handler",
"that",
"routes",
"based",
"on",
"endpoint",
"metadata"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/internal/handler/meta.go#L62-L67 |
134,479 | micro/micro | internal/usage/usage.go | New | func New(service string) *pb.Usage {
id := fmt.Sprintf("micro.%s.%s.%s", service, version.V, uuid.New().String())
srv := "micro." + service
sum := sha256.Sum256([]byte(id))
return &pb.Usage{
Service: srv,
Version: v,
Id: fmt.Sprintf("%x", sum),
Timestamp: uint64(time.Now().UnixNano()),
Window:... | go | func New(service string) *pb.Usage {
id := fmt.Sprintf("micro.%s.%s.%s", service, version.V, uuid.New().String())
srv := "micro." + service
sum := sha256.Sum256([]byte(id))
return &pb.Usage{
Service: srv,
Version: v,
Id: fmt.Sprintf("%x", sum),
Timestamp: uint64(time.Now().UnixNano()),
Window:... | [
"func",
"New",
"(",
"service",
"string",
")",
"*",
"pb",
".",
"Usage",
"{",
"id",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"service",
",",
"version",
".",
"V",
",",
"uuid",
".",
"New",
"(",
")",
".",
"String",
"(",
")",
")",
"\n",
"... | // New generates a new usage report to be filled in | [
"New",
"generates",
"a",
"new",
"usage",
"report",
"to",
"be",
"filled",
"in"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/internal/usage/usage.go#L32-L47 |
134,480 | micro/micro | internal/usage/usage.go | Report | func Report(ug *pb.Usage) error {
if v := os.Getenv("MICRO_REPORT_USAGE"); v == "false" {
return nil
}
// update timestamp/window
now := uint64(time.Now().UnixNano())
ug.Window = now - ug.Timestamp
ug.Timestamp = now
p, err := proto.Marshal(ug)
if err != nil {
return err
}
req, err := http.NewRequest("P... | go | func Report(ug *pb.Usage) error {
if v := os.Getenv("MICRO_REPORT_USAGE"); v == "false" {
return nil
}
// update timestamp/window
now := uint64(time.Now().UnixNano())
ug.Window = now - ug.Timestamp
ug.Timestamp = now
p, err := proto.Marshal(ug)
if err != nil {
return err
}
req, err := http.NewRequest("P... | [
"func",
"Report",
"(",
"ug",
"*",
"pb",
".",
"Usage",
")",
"error",
"{",
"if",
"v",
":=",
"os",
".",
"Getenv",
"(",
"\"",
"\"",
")",
";",
"v",
"==",
"\"",
"\"",
"{",
"return",
"nil",
"\n",
"}",
"\n\n",
"// update timestamp/window",
"now",
":=",
"... | // Report reports the current usage | [
"Report",
"reports",
"the",
"current",
"usage"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/internal/usage/usage.go#L50-L77 |
134,481 | micro/micro | internal/command/bot/commands.go | Echo | func Echo(ctx *cli.Context) command.Command {
usage := "echo [text]"
desc := "Returns the [text]"
return command.NewCommand("echo", usage, desc, func(args ...string) ([]byte, error) {
if len(args) < 2 {
return []byte("echo what?"), nil
}
return []byte(strings.Join(args[1:], " ")), nil
})
} | go | func Echo(ctx *cli.Context) command.Command {
usage := "echo [text]"
desc := "Returns the [text]"
return command.NewCommand("echo", usage, desc, func(args ...string) ([]byte, error) {
if len(args) < 2 {
return []byte("echo what?"), nil
}
return []byte(strings.Join(args[1:], " ")), nil
})
} | [
"func",
"Echo",
"(",
"ctx",
"*",
"cli",
".",
"Context",
")",
"command",
".",
"Command",
"{",
"usage",
":=",
"\"",
"\"",
"\n",
"desc",
":=",
"\"",
"\"",
"\n\n",
"return",
"command",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"usage",
",",
"desc",
",",... | // Echo returns the same message | [
"Echo",
"returns",
"the",
"same",
"message"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/internal/command/bot/commands.go#L13-L23 |
134,482 | micro/micro | internal/command/bot/commands.go | Hello | func Hello(ctx *cli.Context) command.Command {
usage := "hello"
desc := "Returns a greeting"
return command.NewCommand("hello", usage, desc, func(args ...string) ([]byte, error) {
return []byte("hey what's up?"), nil
})
} | go | func Hello(ctx *cli.Context) command.Command {
usage := "hello"
desc := "Returns a greeting"
return command.NewCommand("hello", usage, desc, func(args ...string) ([]byte, error) {
return []byte("hey what's up?"), nil
})
} | [
"func",
"Hello",
"(",
"ctx",
"*",
"cli",
".",
"Context",
")",
"command",
".",
"Command",
"{",
"usage",
":=",
"\"",
"\"",
"\n",
"desc",
":=",
"\"",
"\"",
"\n\n",
"return",
"command",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"usage",
",",
"desc",
","... | // Hello returns a greeting | [
"Hello",
"returns",
"a",
"greeting"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/internal/command/bot/commands.go#L26-L33 |
134,483 | micro/micro | internal/command/bot/commands.go | Get | func Get(ctx *cli.Context) command.Command {
usage := "get service [name]"
desc := "Returns a registered service"
return command.NewCommand("get", usage, desc, func(args ...string) ([]byte, error) {
if len(args) < 2 {
return []byte("get what?"), nil
}
switch args[1] {
case "service":
if len(args) < 3 ... | go | func Get(ctx *cli.Context) command.Command {
usage := "get service [name]"
desc := "Returns a registered service"
return command.NewCommand("get", usage, desc, func(args ...string) ([]byte, error) {
if len(args) < 2 {
return []byte("get what?"), nil
}
switch args[1] {
case "service":
if len(args) < 3 ... | [
"func",
"Get",
"(",
"ctx",
"*",
"cli",
".",
"Context",
")",
"command",
".",
"Command",
"{",
"usage",
":=",
"\"",
"\"",
"\n",
"desc",
":=",
"\"",
"\"",
"\n\n",
"return",
"command",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"usage",
",",
"desc",
",",
... | // Get service returns a service | [
"Get",
"service",
"returns",
"a",
"service"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/internal/command/bot/commands.go#L46-L68 |
134,484 | micro/micro | internal/command/bot/commands.go | Call | func Call(ctx *cli.Context) command.Command {
usage := "call [service] [endpoint] [request]"
desc := "Returns the response for a service call"
return command.NewCommand("call", usage, desc, func(args ...string) ([]byte, error) {
var cargs []string
for _, arg := range args {
if len(strings.TrimSpace(arg)) ==... | go | func Call(ctx *cli.Context) command.Command {
usage := "call [service] [endpoint] [request]"
desc := "Returns the response for a service call"
return command.NewCommand("call", usage, desc, func(args ...string) ([]byte, error) {
var cargs []string
for _, arg := range args {
if len(strings.TrimSpace(arg)) ==... | [
"func",
"Call",
"(",
"ctx",
"*",
"cli",
".",
"Context",
")",
"command",
".",
"Command",
"{",
"usage",
":=",
"\"",
"\"",
"\n",
"desc",
":=",
"\"",
"\"",
"\n\n",
"return",
"command",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"usage",
",",
"desc",
",",... | // Call returns a service call | [
"Call",
"returns",
"a",
"service",
"call"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/internal/command/bot/commands.go#L110-L134 |
134,485 | micro/micro | internal/command/bot/commands.go | ThreeLaws | func ThreeLaws(ctx *cli.Context) command.Command {
usage := "the three laws"
desc := "Returns the three laws of robotics"
return command.NewCommand("the three laws", usage, desc, func(args ...string) ([]byte, error) {
laws := []string{
"1. A robot may not injure a human being or, through inaction, allow a huma... | go | func ThreeLaws(ctx *cli.Context) command.Command {
usage := "the three laws"
desc := "Returns the three laws of robotics"
return command.NewCommand("the three laws", usage, desc, func(args ...string) ([]byte, error) {
laws := []string{
"1. A robot may not injure a human being or, through inaction, allow a huma... | [
"func",
"ThreeLaws",
"(",
"ctx",
"*",
"cli",
".",
"Context",
")",
"command",
".",
"Command",
"{",
"usage",
":=",
"\"",
"\"",
"\n",
"desc",
":=",
"\"",
"\"",
"\n\n",
"return",
"command",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"usage",
",",
"desc",
... | // Laws of robotics | [
"Laws",
"of",
"robotics"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/internal/command/bot/commands.go#L187-L199 |
134,486 | micro/micro | internal/command/bot/commands.go | Time | func Time(ctx *cli.Context) command.Command {
usage := "time"
desc := "Returns the server time"
return command.NewCommand("time", usage, desc, func(args ...string) ([]byte, error) {
t := time.Now().Format(time.RFC1123)
return []byte("Server time is: " + t), nil
})
} | go | func Time(ctx *cli.Context) command.Command {
usage := "time"
desc := "Returns the server time"
return command.NewCommand("time", usage, desc, func(args ...string) ([]byte, error) {
t := time.Now().Format(time.RFC1123)
return []byte("Server time is: " + t), nil
})
} | [
"func",
"Time",
"(",
"ctx",
"*",
"cli",
".",
"Context",
")",
"command",
".",
"Command",
"{",
"usage",
":=",
"\"",
"\"",
"\n",
"desc",
":=",
"\"",
"\"",
"\n\n",
"return",
"command",
".",
"NewCommand",
"(",
"\"",
"\"",
",",
"usage",
",",
"desc",
",",... | // Time returns the time | [
"Time",
"returns",
"the",
"time"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/internal/command/bot/commands.go#L202-L210 |
134,487 | micro/micro | plugin/options.go | WithFlag | func WithFlag(flag ...cli.Flag) Option {
return func(o *Options) {
o.Flags = append(o.Flags, flag...)
}
} | go | func WithFlag(flag ...cli.Flag) Option {
return func(o *Options) {
o.Flags = append(o.Flags, flag...)
}
} | [
"func",
"WithFlag",
"(",
"flag",
"...",
"cli",
".",
"Flag",
")",
"Option",
"{",
"return",
"func",
"(",
"o",
"*",
"Options",
")",
"{",
"o",
".",
"Flags",
"=",
"append",
"(",
"o",
".",
"Flags",
",",
"flag",
"...",
")",
"\n",
"}",
"\n",
"}"
] | // WithFlag adds flags to a plugin | [
"WithFlag",
"adds",
"flags",
"to",
"a",
"plugin"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/plugin/options.go#L19-L23 |
134,488 | micro/micro | plugin/options.go | WithCommand | func WithCommand(cmd ...cli.Command) Option {
return func(o *Options) {
o.Commands = append(o.Commands, cmd...)
}
} | go | func WithCommand(cmd ...cli.Command) Option {
return func(o *Options) {
o.Commands = append(o.Commands, cmd...)
}
} | [
"func",
"WithCommand",
"(",
"cmd",
"...",
"cli",
".",
"Command",
")",
"Option",
"{",
"return",
"func",
"(",
"o",
"*",
"Options",
")",
"{",
"o",
".",
"Commands",
"=",
"append",
"(",
"o",
".",
"Commands",
",",
"cmd",
"...",
")",
"\n",
"}",
"\n",
"}... | // WithCommand adds commands to a plugin | [
"WithCommand",
"adds",
"commands",
"to",
"a",
"plugin"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/plugin/options.go#L26-L30 |
134,489 | micro/micro | plugin/options.go | WithHandler | func WithHandler(h ...Handler) Option {
return func(o *Options) {
o.Handlers = append(o.Handlers, h...)
}
} | go | func WithHandler(h ...Handler) Option {
return func(o *Options) {
o.Handlers = append(o.Handlers, h...)
}
} | [
"func",
"WithHandler",
"(",
"h",
"...",
"Handler",
")",
"Option",
"{",
"return",
"func",
"(",
"o",
"*",
"Options",
")",
"{",
"o",
".",
"Handlers",
"=",
"append",
"(",
"o",
".",
"Handlers",
",",
"h",
"...",
")",
"\n",
"}",
"\n",
"}"
] | // WithHandler adds middleware handlers to | [
"WithHandler",
"adds",
"middleware",
"handlers",
"to"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/plugin/options.go#L33-L37 |
134,490 | micro/micro | plugin/options.go | WithInit | func WithInit(fn func(*cli.Context) error) Option {
return func(o *Options) {
o.Init = fn
}
} | go | func WithInit(fn func(*cli.Context) error) Option {
return func(o *Options) {
o.Init = fn
}
} | [
"func",
"WithInit",
"(",
"fn",
"func",
"(",
"*",
"cli",
".",
"Context",
")",
"error",
")",
"Option",
"{",
"return",
"func",
"(",
"o",
"*",
"Options",
")",
"{",
"o",
".",
"Init",
"=",
"fn",
"\n",
"}",
"\n",
"}"
] | // WithInit sets the init function | [
"WithInit",
"sets",
"the",
"init",
"function"
] | 2769d19bcb5b2b5c61e5237f81639dd7411c24cc | https://github.com/micro/micro/blob/2769d19bcb5b2b5c61e5237f81639dd7411c24cc/plugin/options.go#L47-L51 |
134,491 | chromedp/chromedp | chromedp.go | NewContext | func NewContext(parent context.Context, opts ...ContextOption) (context.Context, context.CancelFunc) {
ctx, cancel := context.WithCancel(parent)
c := &Context{cancel: cancel, first: true}
if pc := FromContext(parent); pc != nil {
c.Allocator = pc.Allocator
c.Browser = pc.Browser
// don't inherit Target, so th... | go | func NewContext(parent context.Context, opts ...ContextOption) (context.Context, context.CancelFunc) {
ctx, cancel := context.WithCancel(parent)
c := &Context{cancel: cancel, first: true}
if pc := FromContext(parent); pc != nil {
c.Allocator = pc.Allocator
c.Browser = pc.Browser
// don't inherit Target, so th... | [
"func",
"NewContext",
"(",
"parent",
"context",
".",
"Context",
",",
"opts",
"...",
"ContextOption",
")",
"(",
"context",
".",
"Context",
",",
"context",
".",
"CancelFunc",
")",
"{",
"ctx",
",",
"cancel",
":=",
"context",
".",
"WithCancel",
"(",
"parent",
... | // NewContext creates a chromedp context from the parent context. The parent
// context's Allocator is inherited, defaulting to an ExecAllocator with
// DefaultExecAllocatorOptions.
//
// If the parent context contains an allocated Browser, the child context
// inherits it, and its first Run creates a new tab on that b... | [
"NewContext",
"creates",
"a",
"chromedp",
"context",
"from",
"the",
"parent",
"context",
".",
"The",
"parent",
"context",
"s",
"Allocator",
"is",
"inherited",
"defaulting",
"to",
"an",
"ExecAllocator",
"with",
"DefaultExecAllocatorOptions",
".",
"If",
"the",
"pare... | d15a83b928250a6181ad5c2cd843b530a581fd2b | https://github.com/chromedp/chromedp/blob/d15a83b928250a6181ad5c2cd843b530a581fd2b/chromedp.go#L85-L161 |
134,492 | chromedp/chromedp | chromedp.go | FromContext | func FromContext(ctx context.Context) *Context {
c, _ := ctx.Value(contextKey{}).(*Context)
return c
} | go | func FromContext(ctx context.Context) *Context {
c, _ := ctx.Value(contextKey{}).(*Context)
return c
} | [
"func",
"FromContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"Context",
"{",
"c",
",",
"_",
":=",
"ctx",
".",
"Value",
"(",
"contextKey",
"{",
"}",
")",
".",
"(",
"*",
"Context",
")",
"\n",
"return",
"c",
"\n",
"}"
] | // FromContext extracts the Context data stored inside a context.Context. | [
"FromContext",
"extracts",
"the",
"Context",
"data",
"stored",
"inside",
"a",
"context",
".",
"Context",
"."
] | d15a83b928250a6181ad5c2cd843b530a581fd2b | https://github.com/chromedp/chromedp/blob/d15a83b928250a6181ad5c2cd843b530a581fd2b/chromedp.go#L166-L169 |
134,493 | chromedp/chromedp | chromedp.go | Run | func Run(ctx context.Context, actions ...Action) error {
c := FromContext(ctx)
// If c is nil, it's not a chromedp context.
// If c.Allocator is nil, NewContext wasn't used properly.
// If c.cancel is nil, Run is being called directly with an allocator
// context.
if c == nil || c.Allocator == nil || c.cancel == ... | go | func Run(ctx context.Context, actions ...Action) error {
c := FromContext(ctx)
// If c is nil, it's not a chromedp context.
// If c.Allocator is nil, NewContext wasn't used properly.
// If c.cancel is nil, Run is being called directly with an allocator
// context.
if c == nil || c.Allocator == nil || c.cancel == ... | [
"func",
"Run",
"(",
"ctx",
"context",
".",
"Context",
",",
"actions",
"...",
"Action",
")",
"error",
"{",
"c",
":=",
"FromContext",
"(",
"ctx",
")",
"\n",
"// If c is nil, it's not a chromedp context.",
"// If c.Allocator is nil, NewContext wasn't used properly.",
"// I... | // Run runs an action against context. The provided context must be a valid
// chromedp context, typically created via NewContext. | [
"Run",
"runs",
"an",
"action",
"against",
"context",
".",
"The",
"provided",
"context",
"must",
"be",
"a",
"valid",
"chromedp",
"context",
"typically",
"created",
"via",
"NewContext",
"."
] | d15a83b928250a6181ad5c2cd843b530a581fd2b | https://github.com/chromedp/chromedp/blob/d15a83b928250a6181ad5c2cd843b530a581fd2b/chromedp.go#L193-L217 |
134,494 | chromedp/chromedp | chromedp.go | WithBrowserOption | func WithBrowserOption(opts ...BrowserOption) ContextOption {
return func(c *Context) {
if !c.first {
panic("WithBrowserOption can only be used when allocating a new browser")
}
c.browserOpts = append(c.browserOpts, opts...)
}
} | go | func WithBrowserOption(opts ...BrowserOption) ContextOption {
return func(c *Context) {
if !c.first {
panic("WithBrowserOption can only be used when allocating a new browser")
}
c.browserOpts = append(c.browserOpts, opts...)
}
} | [
"func",
"WithBrowserOption",
"(",
"opts",
"...",
"BrowserOption",
")",
"ContextOption",
"{",
"return",
"func",
"(",
"c",
"*",
"Context",
")",
"{",
"if",
"!",
"c",
".",
"first",
"{",
"panic",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"c",
".",
"browserOp... | // WithBrowserOption allows passing a number of browser options to the allocator
// when allocating a new browser. As such, this context option can only be used
// when NewContext is allocating a new browser. | [
"WithBrowserOption",
"allows",
"passing",
"a",
"number",
"of",
"browser",
"options",
"to",
"the",
"allocator",
"when",
"allocating",
"a",
"new",
"browser",
".",
"As",
"such",
"this",
"context",
"option",
"can",
"only",
"be",
"used",
"when",
"NewContext",
"is",... | d15a83b928250a6181ad5c2cd843b530a581fd2b | https://github.com/chromedp/chromedp/blob/d15a83b928250a6181ad5c2cd843b530a581fd2b/chromedp.go#L305-L312 |
134,495 | chromedp/chromedp | chromedp.go | Targets | func Targets(ctx context.Context) ([]*target.Info, error) {
// Don't rely on Run, as that needs to be able to call Targets, and we
// don't want cyclic func calls.
c := FromContext(ctx)
if c == nil || c.Allocator == nil {
return nil, ErrInvalidContext
}
if c.Browser == nil {
browser, err := c.Allocator.Alloca... | go | func Targets(ctx context.Context) ([]*target.Info, error) {
// Don't rely on Run, as that needs to be able to call Targets, and we
// don't want cyclic func calls.
c := FromContext(ctx)
if c == nil || c.Allocator == nil {
return nil, ErrInvalidContext
}
if c.Browser == nil {
browser, err := c.Allocator.Alloca... | [
"func",
"Targets",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"[",
"]",
"*",
"target",
".",
"Info",
",",
"error",
")",
"{",
"// Don't rely on Run, as that needs to be able to call Targets, and we",
"// don't want cyclic func calls.",
"c",
":=",
"FromContext",
"(... | // Targets lists all the targets in the browser attached to the given context. | [
"Targets",
"lists",
"all",
"the",
"targets",
"in",
"the",
"browser",
"attached",
"to",
"the",
"given",
"context",
"."
] | d15a83b928250a6181ad5c2cd843b530a581fd2b | https://github.com/chromedp/chromedp/blob/d15a83b928250a6181ad5c2cd843b530a581fd2b/chromedp.go#L315-L330 |
134,496 | chromedp/chromedp | chromedp.go | Do | func (t Tasks) Do(ctx context.Context) error {
for _, a := range t {
if err := a.Do(ctx); err != nil {
return err
}
}
return nil
} | go | func (t Tasks) Do(ctx context.Context) error {
for _, a := range t {
if err := a.Do(ctx); err != nil {
return err
}
}
return nil
} | [
"func",
"(",
"t",
"Tasks",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"error",
"{",
"for",
"_",
",",
"a",
":=",
"range",
"t",
"{",
"if",
"err",
":=",
"a",
".",
"Do",
"(",
"ctx",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"err",
... | // Do executes the list of Actions sequentially, using the provided context and
// frame handler. | [
"Do",
"executes",
"the",
"list",
"of",
"Actions",
"sequentially",
"using",
"the",
"provided",
"context",
"and",
"frame",
"handler",
"."
] | d15a83b928250a6181ad5c2cd843b530a581fd2b | https://github.com/chromedp/chromedp/blob/d15a83b928250a6181ad5c2cd843b530a581fd2b/chromedp.go#L352-L359 |
134,497 | chromedp/chromedp | chromedp.go | ListenBrowser | func ListenBrowser(ctx context.Context, fn func(ev interface{})) {
c := FromContext(ctx)
if c == nil {
panic(ErrInvalidContext)
}
if c.Browser != nil {
panic("ListenBrowser must be used before a browser is created")
}
c.browserListeners = append(c.browserListeners, fn)
} | go | func ListenBrowser(ctx context.Context, fn func(ev interface{})) {
c := FromContext(ctx)
if c == nil {
panic(ErrInvalidContext)
}
if c.Browser != nil {
panic("ListenBrowser must be used before a browser is created")
}
c.browserListeners = append(c.browserListeners, fn)
} | [
"func",
"ListenBrowser",
"(",
"ctx",
"context",
".",
"Context",
",",
"fn",
"func",
"(",
"ev",
"interface",
"{",
"}",
")",
")",
"{",
"c",
":=",
"FromContext",
"(",
"ctx",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"panic",
"(",
"ErrInvalidContext",
")",
... | // ListenBrowser adds a function which will be called whenever a browser event
// is received on the chromedp context.
//
// Note that the function is called synchronously when handling events. As such,
// the function should do as little work as possible and avoid blocking, as
// otherwise the entire browser handler w... | [
"ListenBrowser",
"adds",
"a",
"function",
"which",
"will",
"be",
"called",
"whenever",
"a",
"browser",
"event",
"is",
"received",
"on",
"the",
"chromedp",
"context",
".",
"Note",
"that",
"the",
"function",
"is",
"called",
"synchronously",
"when",
"handling",
"... | d15a83b928250a6181ad5c2cd843b530a581fd2b | https://github.com/chromedp/chromedp/blob/d15a83b928250a6181ad5c2cd843b530a581fd2b/chromedp.go#L387-L396 |
134,498 | chromedp/chromedp | chromedp.go | ListenTarget | func ListenTarget(ctx context.Context, fn func(ev interface{})) {
c := FromContext(ctx)
if c == nil {
panic(ErrInvalidContext)
}
if c.Target != nil {
panic("ListenTarget must be used before a target is created")
}
c.targetListeners = append(c.targetListeners, fn)
} | go | func ListenTarget(ctx context.Context, fn func(ev interface{})) {
c := FromContext(ctx)
if c == nil {
panic(ErrInvalidContext)
}
if c.Target != nil {
panic("ListenTarget must be used before a target is created")
}
c.targetListeners = append(c.targetListeners, fn)
} | [
"func",
"ListenTarget",
"(",
"ctx",
"context",
".",
"Context",
",",
"fn",
"func",
"(",
"ev",
"interface",
"{",
"}",
")",
")",
"{",
"c",
":=",
"FromContext",
"(",
"ctx",
")",
"\n",
"if",
"c",
"==",
"nil",
"{",
"panic",
"(",
"ErrInvalidContext",
")",
... | // ListenTarget adds a function which will be called whenever a target event is
// received on the chromedp context. Note that this only includes browser
// events; command responses and target events are not included.
//
// Note that the function is called synchronously when handling events. As such,
// the function s... | [
"ListenTarget",
"adds",
"a",
"function",
"which",
"will",
"be",
"called",
"whenever",
"a",
"target",
"event",
"is",
"received",
"on",
"the",
"chromedp",
"context",
".",
"Note",
"that",
"this",
"only",
"includes",
"browser",
"events",
";",
"command",
"responses... | d15a83b928250a6181ad5c2cd843b530a581fd2b | https://github.com/chromedp/chromedp/blob/d15a83b928250a6181ad5c2cd843b530a581fd2b/chromedp.go#L405-L414 |
134,499 | chromedp/chromedp | eval.go | EvalObjectGroup | func EvalObjectGroup(objectGroup string) EvaluateOption {
return func(p *runtime.EvaluateParams) *runtime.EvaluateParams {
return p.WithObjectGroup(objectGroup)
}
} | go | func EvalObjectGroup(objectGroup string) EvaluateOption {
return func(p *runtime.EvaluateParams) *runtime.EvaluateParams {
return p.WithObjectGroup(objectGroup)
}
} | [
"func",
"EvalObjectGroup",
"(",
"objectGroup",
"string",
")",
"EvaluateOption",
"{",
"return",
"func",
"(",
"p",
"*",
"runtime",
".",
"EvaluateParams",
")",
"*",
"runtime",
".",
"EvaluateParams",
"{",
"return",
"p",
".",
"WithObjectGroup",
"(",
"objectGroup",
... | // EvalObjectGroup is a evaluate option to set the object group. | [
"EvalObjectGroup",
"is",
"a",
"evaluate",
"option",
"to",
"set",
"the",
"object",
"group",
"."
] | d15a83b928250a6181ad5c2cd843b530a581fd2b | https://github.com/chromedp/chromedp/blob/d15a83b928250a6181ad5c2cd843b530a581fd2b/eval.go#L80-L84 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.