Help us shape the future of Go! Take the 2026 Go Developer Survey

integration

package
v0.40.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

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

func LoginUser added in v0.39.0

func LoginUser(t *testing.T) *iam.OAuth20Service

Types

type Client added in v0.24.0

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Get added in v0.24.0

func (a *Client) Get(params *GetPhantauthParams) (*Get200Error, error)

func (*Client) Post added in v0.24.0

func (a *Client) Post(params *PostPhantauthParams) (*Post200Error, error)

func (*Client) SetTransport added in v0.24.0

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientService added in v0.24.0

type ClientService interface {
	Get(params *GetPhantauthParams) (*Get200Error, error)
	Post(params *PostPhantauthParams) (*Post200Error, error)

	SetTransport(transport runtime.ClientTransport)
}

func NewService added in v0.24.0

func NewService(transport runtime.ClientTransport) ClientService

SECTION 4 - operation client

type ConfigRepositoryPhantAuthImpl added in v0.24.0

type ConfigRepositoryPhantAuthImpl struct {
}

func (*ConfigRepositoryPhantAuthImpl) GetClientId added in v0.24.0

func (c *ConfigRepositoryPhantAuthImpl) GetClientId() string

func (*ConfigRepositoryPhantAuthImpl) GetClientSecret added in v0.24.0

func (c *ConfigRepositoryPhantAuthImpl) GetClientSecret() string

func (*ConfigRepositoryPhantAuthImpl) GetJusticeBaseUrl added in v0.24.0

func (c *ConfigRepositoryPhantAuthImpl) GetJusticeBaseUrl() string

type ConnectionManagerImpl added in v0.15.0

type ConnectionManagerImpl struct {
}

func (*ConnectionManagerImpl) Close added in v0.15.0

func (connManager *ConnectionManagerImpl) Close() error

func (*ConnectionManagerImpl) Get added in v0.15.0

func (*ConnectionManagerImpl) Save added in v0.15.0

func (connManager *ConnectionManagerImpl) Save(conn *connectionutils.WSConnection)

type Get200Error added in v0.24.0

type Get200Error struct {
	Payload string
}

Get200Error got renamed because linter is complaining "should conform to the `XxxError` format (errname)"

func (*Get200Error) Error added in v0.24.0

func (o *Get200Error) Error() string

func (*Get200Error) PostPayload added in v0.24.0

func (o *Get200Error) PostPayload() string

type GetPhantauthParams added in v0.24.0

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 added in v0.24.0

func (g GetPhantauthParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

type GetReader added in v0.24.0

type GetReader struct{}

SECTION 2 - response of GET

func (*GetReader) ReadResponse added in v0.24.0

func (o *GetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

type OauthmodelPhantauthToken added in v0.24.0

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 added in v0.24.0

type PhanthauthService struct {
	ClientPhantauthService ClientService

	Runtime   *httptransport.Runtime
	Transport runtime.ClientTransport
}

SECTION 3 - service client

func New added in v0.24.0

func NewClientWithBasePath added in v0.24.0

func NewClientWithBasePath(url string, endpoint string) *PhanthauthService

type Post200Error added in v0.24.0

type Post200Error struct {
	Payload *OauthmodelPhantauthToken
}

Post200Error got renamed because linter is complaining "should conform to the `XxxError` format (errname)"

func NewPostOK added in v0.24.0

func NewPostOK() *Post200Error

func (*Post200Error) Error added in v0.24.0

func (p *Post200Error) Error() string

func (*Post200Error) PostPayload added in v0.24.0

func (p *Post200Error) PostPayload() *OauthmodelPhantauthToken

type PostPhantauthParams added in v0.24.0

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 added in v0.24.0

func (p *PostPhantauthParams) Validate() error

func (*PostPhantauthParams) WriteToRequest added in v0.24.0

func (p *PostPhantauthParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

type PostReader added in v0.24.0

type PostReader struct {
}

SECTION 2 - response of POST

func (*PostReader) ReadResponse added in v0.24.0

func (p *PostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

type TestWrapperService added in v0.24.0

type TestWrapperService struct {
	Client           *PhanthauthService
	ConfigRepository repository.ConfigRepository
	TokenRepository  repository.TokenRepository
}

type TokenRepositoryPhantAuthImpl added in v0.24.0

type TokenRepositoryPhantAuthImpl struct {
	IssuedTime  *time.Time
	AccessToken *iamclientmodels.OauthmodelTokenResponseV3
}

func (*TokenRepositoryPhantAuthImpl) GetToken added in v0.24.0

func (*TokenRepositoryPhantAuthImpl) RemoveToken added in v0.24.0

func (t *TokenRepositoryPhantAuthImpl) RemoveToken() error

func (*TokenRepositoryPhantAuthImpl) Store added in v0.24.0

func (t *TokenRepositoryPhantAuthImpl) Store(accessToken interface{}) error

func (*TokenRepositoryPhantAuthImpl) TokenIssuedTimeUTC added in v0.24.0

func (t *TokenRepositoryPhantAuthImpl) TokenIssuedTimeUTC() time.Time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL