Documentation
¶
Index ¶
- Variables
- func LoginUser(t *testing.T) *iam.OAuth20Service
- type Client
- type ClientService
- type ConfigRepositoryPhantAuthImpl
- type ConnectionManagerImpl
- type Get200Error
- type GetPhantauthParams
- type GetReader
- type OauthmodelPhantauthToken
- type PhanthauthService
- type Post200Error
- type PostPhantauthParams
- type PostReader
- type TestWrapperService
- type TokenRepositoryPhantAuthImpl
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NamespaceTest = os.Getenv("AB_NAMESPACE")
)
View Source
var ( OAuth20PhantAuthService = &TestWrapperService{ Client: NewClientWithBasePath(getPhantauthURL(), ""), ConfigRepository: &ConfigRepositoryPhantAuthImpl{}, TokenRepository: &TokenRepositoryPhantAuthImpl{}, } )
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Get ¶
func (a *Client) Get(params *GetPhantauthParams) (*Get200Error, error)
func (*Client) Post ¶
func (a *Client) Post(params *PostPhantauthParams) (*Post200Error, error)
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientService ¶
type ClientService interface { Get(params *GetPhantauthParams) (*Get200Error, error) Post(params *PostPhantauthParams) (*Post200Error, error) SetTransport(transport runtime.ClientTransport) }
func NewService ¶
func NewService(transport runtime.ClientTransport) ClientService
SECTION 4 - operation client
type ConfigRepositoryPhantAuthImpl ¶
type ConfigRepositoryPhantAuthImpl struct { }
func (*ConfigRepositoryPhantAuthImpl) GetClientId ¶
func (c *ConfigRepositoryPhantAuthImpl) GetClientId() string
func (*ConfigRepositoryPhantAuthImpl) GetClientSecret ¶
func (c *ConfigRepositoryPhantAuthImpl) GetClientSecret() string
func (*ConfigRepositoryPhantAuthImpl) GetJusticeBaseUrl ¶
func (c *ConfigRepositoryPhantAuthImpl) GetJusticeBaseUrl() string
type ConnectionManagerImpl ¶
type ConnectionManagerImpl struct { }
func (*ConnectionManagerImpl) Close ¶
func (connManager *ConnectionManagerImpl) Close() error
func (*ConnectionManagerImpl) Get ¶
func (connManager *ConnectionManagerImpl) Get() *connectionutils.WSConnection
func (*ConnectionManagerImpl) Save ¶
func (connManager *ConnectionManagerImpl) Save(conn *connectionutils.WSConnection)
type Get200Error ¶
type Get200Error struct {
Payload string
}
Get200Error got renamed because linter is complaining "should conform to the `XxxError` format (errname)"
func (*Get200Error) Error ¶
func (o *Get200Error) Error() string
func (*Get200Error) PostPayload ¶
func (o *Get200Error) PostPayload() string
type GetPhantauthParams ¶
type GetPhantauthParams struct { Username string Kind string RetryPolicy *utils.Retry AuthInfoWriter runtime.ClientAuthInfoWriter Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
SECTION 1 - parameters of GET
func (GetPhantauthParams) WriteToRequest ¶
func (g GetPhantauthParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
type GetReader ¶
type GetReader struct{}
SECTION 2 - response of GET
func (*GetReader) ReadResponse ¶
type OauthmodelPhantauthToken ¶
type OauthmodelPhantauthToken struct { AccessToken *string `json:"access_token"` IDToken *string `json:"id_token"` RefreshToken *string `json:"refresh_token"` TokenType *string `json:"token_type"` }
OauthmodelPhantauthToken is an addition for SECTION 2 - response of POST
type PhanthauthService ¶
type PhanthauthService struct { ClientPhantauthService ClientService Runtime *httptransport.Runtime Transport runtime.ClientTransport }
SECTION 3 - service client
func New ¶
func New(transport runtime.ClientTransport, runtime *httptransport.Runtime) *PhanthauthService
func NewClientWithBasePath ¶
func NewClientWithBasePath(url string, endpoint string) *PhanthauthService
type Post200Error ¶
type Post200Error struct {
Payload *OauthmodelPhantauthToken
}
Post200Error got renamed because linter is complaining "should conform to the `XxxError` format (errname)"
func NewPostOK ¶
func NewPostOK() *Post200Error
func (*Post200Error) Error ¶
func (p *Post200Error) Error() string
func (*Post200Error) PostPayload ¶
func (p *Post200Error) PostPayload() *OauthmodelPhantauthToken
type PostPhantauthParams ¶
type PostPhantauthParams struct { ClientID string ClientSecret string RedirectURI string Code string GrantType string RetryPolicy *utils.Retry AuthInfoWriter runtime.ClientAuthInfoWriter Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
SECTION 1 - parameters of POST
func (*PostPhantauthParams) Validate ¶
func (p *PostPhantauthParams) Validate() error
func (*PostPhantauthParams) WriteToRequest ¶
func (p *PostPhantauthParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
type PostReader ¶
type PostReader struct { }
SECTION 2 - response of POST
func (*PostReader) ReadResponse ¶
func (p *PostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
type TestWrapperService ¶
type TestWrapperService struct { Client *PhanthauthService ConfigRepository repository.ConfigRepository TokenRepository repository.TokenRepository }
type TokenRepositoryPhantAuthImpl ¶
type TokenRepositoryPhantAuthImpl struct { IssuedTime *time.Time AccessToken *repository.Token }
func (*TokenRepositoryPhantAuthImpl) GetToken ¶
func (t *TokenRepositoryPhantAuthImpl) GetToken() (*repository.Token, error)
func (*TokenRepositoryPhantAuthImpl) RemoveToken ¶
func (t *TokenRepositoryPhantAuthImpl) RemoveToken() error
func (*TokenRepositoryPhantAuthImpl) Store ¶
func (t *TokenRepositoryPhantAuthImpl) Store(accessToken interface{}) error
func (*TokenRepositoryPhantAuthImpl) TokenIssuedTimeUTC ¶
func (t *TokenRepositoryPhantAuthImpl) TokenIssuedTimeUTC() time.Time
Click to show internal directories.
Click to hide internal directories.