Documentation ¶
Index ¶
- func GetDeploymentByName(ctx context.Context, apiClient *appmanager.APIClient, namespace string, ...) (appmanager.Deployment, error)
- type AuthStore
- type PlatformTokenManager
- func (p *PlatformTokenManager) CreateToken(ctx context.Context, name, role, namespace string) (string, error)
- func (p *PlatformTokenManager) RemoveToken(ctx context.Context, name, namespace string) (bool, error)
- func (p *PlatformTokenManager) TokenExists(ctx context.Context, name, namespace string) (bool, error)
- type TokenData
- type TokenManager
- type TokenNotFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDeploymentByName ¶
func GetDeploymentByName(ctx context.Context, apiClient *appmanager.APIClient, namespace string, name string) (appmanager.Deployment, error)
GetDeploymentByName fetches a deployment from the VP by namespace and name
Types ¶
type AuthStore ¶
type AuthStore struct {
// contains filtered or unexported fields
}
func NewAuthStore ¶
func NewAuthStore(tokenManager TokenManager) *AuthStore
type PlatformTokenManager ¶
type PlatformTokenManager struct {
PlatformAPIClient *platformApiClient.APIClient
}
PlatformTokenManager manages creation / deletion / querying of Platform API Tokens
func (*PlatformTokenManager) CreateToken ¶
func (*PlatformTokenManager) RemoveToken ¶
func (*PlatformTokenManager) TokenExists ¶
type TokenManager ¶
type TokenManager interface { // TokenExists checks if a token exists in a namespace by name TokenExists(ctx context.Context, name, namespace string) (bool, error) // CreateToken creates a token under a namespace with a given role and returns the secret CreateToken(ctx context.Context, name, role, namespace string) (string, error) // RemoveToken deletes a token from a namespace and returns whether it existed RemoveToken(ctx context.Context, name, namespace string) (bool, error) }
type TokenNotFoundError ¶
TokenNotFoundError represents when no auth token can be found for a namespace
func (TokenNotFoundError) Error ¶
func (err TokenNotFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.