Documentation ¶
Index ¶
- Variables
- type HostCredentialsProvider
- func (g *HostCredentialsProvider) CheckRepositoryAccess(ctx context.Context, _ client.Client, accessCheck *api.SPIAccessCheck) (*api.SPIAccessCheckStatus, error)
- func (g *HostCredentialsProvider) GetBaseUrl() string
- func (g *HostCredentialsProvider) GetOAuthEndpoint() string
- func (g *HostCredentialsProvider) GetServiceProviderUrlForRepo(repoUrl string) (string, error)
- func (g *HostCredentialsProvider) GetType() api.ServiceProviderType
- func (g *HostCredentialsProvider) LookupToken(ctx context.Context, cl client.Client, binding *api.SPIAccessTokenBinding) (*api.SPIAccessToken, error)
- func (g *HostCredentialsProvider) MapToken(_ context.Context, _ *api.SPIAccessTokenBinding, token *api.SPIAccessToken, ...) (serviceprovider.AccessTokenMapper, error)
- func (g *HostCredentialsProvider) OAuthScopesFor(_ *api.Permissions) []string
- func (g *HostCredentialsProvider) PersistMetadata(ctx context.Context, _ client.Client, token *api.SPIAccessToken) error
- func (g *HostCredentialsProvider) Validate(_ context.Context, _ serviceprovider.Validated) (serviceprovider.ValidationResult, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Initializer = serviceprovider.Initializer{ Constructor: serviceprovider.ConstructorFunc(newHostCredentialsProvider), }
Functions ¶
This section is empty.
Types ¶
type HostCredentialsProvider ¶
type HostCredentialsProvider struct { Configuration config.Configuration // contains filtered or unexported fields }
HostCredentialsProvider is a unified provider implementation for any URL-based tokens and only supports manual upload of token data. Matching is done only by URL of the provider, so it is possible to have only one token for particular URL in the given namespace.
func (*HostCredentialsProvider) CheckRepositoryAccess ¶
func (g *HostCredentialsProvider) CheckRepositoryAccess(ctx context.Context, _ client.Client, accessCheck *api.SPIAccessCheck) (*api.SPIAccessCheckStatus, error)
func (*HostCredentialsProvider) GetBaseUrl ¶
func (g *HostCredentialsProvider) GetBaseUrl() string
func (*HostCredentialsProvider) GetOAuthEndpoint ¶
func (g *HostCredentialsProvider) GetOAuthEndpoint() string
func (*HostCredentialsProvider) GetServiceProviderUrlForRepo ¶
func (g *HostCredentialsProvider) GetServiceProviderUrlForRepo(repoUrl string) (string, error)
func (*HostCredentialsProvider) GetType ¶
func (g *HostCredentialsProvider) GetType() api.ServiceProviderType
func (*HostCredentialsProvider) LookupToken ¶
func (g *HostCredentialsProvider) LookupToken(ctx context.Context, cl client.Client, binding *api.SPIAccessTokenBinding) (*api.SPIAccessToken, error)
func (*HostCredentialsProvider) MapToken ¶
func (g *HostCredentialsProvider) MapToken(_ context.Context, _ *api.SPIAccessTokenBinding, token *api.SPIAccessToken, tokenData *api.Token) (serviceprovider.AccessTokenMapper, error)
func (*HostCredentialsProvider) OAuthScopesFor ¶ added in v0.6.8
func (g *HostCredentialsProvider) OAuthScopesFor(_ *api.Permissions) []string
func (*HostCredentialsProvider) PersistMetadata ¶
func (g *HostCredentialsProvider) PersistMetadata(ctx context.Context, _ client.Client, token *api.SPIAccessToken) error
func (*HostCredentialsProvider) Validate ¶
func (g *HostCredentialsProvider) Validate(_ context.Context, _ serviceprovider.Validated) (serviceprovider.ValidationResult, error)
Click to show internal directories.
Click to hide internal directories.