Documentation
¶
Index ¶
- func CreateAPIToken(ac *client.AlpaconClient, tokenRequest APITokenRequest) (string, error)
- func DeleteAPIToken(ac *client.AlpaconClient, tokenID string) error
- func DuplicateAPIToken(ac *client.AlpaconClient, tokenID, name string) (string, error)
- func GetAPITokenIDByName(ac *client.AlpaconClient, tokenName string) (string, error)
- func LoginAndSaveCredentials(loginReq *LoginRequest, token string, insecure bool) error
- func Logout(ac *client.AlpaconClient) error
- func ResolveTokenID(ac *client.AlpaconClient, nameOrID string) (string, error)
- type APITokenAttributes
- type APITokenDuplicateRequest
- type APITokenRequest
- type APITokenResponse
- type LoginRequest
- type LoginResponse
- type TokenScopeAttributes
- type TokenScopeResource
- type TokenScopesResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAPIToken ¶
func CreateAPIToken(ac *client.AlpaconClient, tokenRequest APITokenRequest) (string, error)
func DeleteAPIToken ¶
func DeleteAPIToken(ac *client.AlpaconClient, tokenID string) error
func DuplicateAPIToken ¶ added in v1.4.4
func DuplicateAPIToken(ac *client.AlpaconClient, tokenID, name string) (string, error)
func GetAPITokenIDByName ¶
func GetAPITokenIDByName(ac *client.AlpaconClient, tokenName string) (string, error)
func LoginAndSaveCredentials ¶
func LoginAndSaveCredentials(loginReq *LoginRequest, token string, insecure bool) error
func Logout ¶ added in v0.4.4
func Logout(ac *client.AlpaconClient) error
func ResolveTokenID ¶ added in v1.4.4
func ResolveTokenID(ac *client.AlpaconClient, nameOrID string) (string, error)
Types ¶
type APITokenAttributes ¶
type APITokenAttributes struct {
ID string `json:"id" table:"ID"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
UpdatedAt string `json:"updated_at" table:"Updated At"`
ExpiresAt string `json:"expires_at" table:"Expires At"`
Scopes string `json:"scopes" table:"Scopes"`
}
func GetAPITokenList ¶
func GetAPITokenList(ac *client.AlpaconClient) ([]APITokenAttributes, error)
type APITokenDuplicateRequest ¶ added in v1.4.4
type APITokenDuplicateRequest struct {
Name string `json:"name,omitempty"`
}
type APITokenRequest ¶
type APITokenResponse ¶
type LoginRequest ¶
type LoginResponse ¶
type TokenScopeAttributes ¶ added in v1.4.4
type TokenScopeAttributes struct {
Name string `json:"name" table:"Resource"`
Actions string `json:"actions" table:"Actions"`
ACL string `json:"acl" table:"ACL"`
}
func GetTokenScopes ¶ added in v1.4.4
func GetTokenScopes(ac *client.AlpaconClient) ([]TokenScopeAttributes, error)
type TokenScopeResource ¶ added in v1.4.4
type TokenScopesResponse ¶ added in v1.4.4
type TokenScopesResponse struct {
Resources []TokenScopeResource `json:"resources"`
Wildcards []string `json:"wildcards"`
}
Click to show internal directories.
Click to hide internal directories.