Documentation ¶
Index ¶
- Variables
- type AccessKey
- type Client
- func (c Client) CreateAccessKey(req *CreateAccessKeyRequest) (*CreateAccessKeyResponse, error)
- func (c Client) CreateDestination(req *CreateDestinationRequest) (*Destination, error)
- func (c Client) CreateGrant(req *CreateGrantRequest) (*Grant, error)
- func (c Client) CreateGroup(req *CreateGroupRequest) (*Group, error)
- func (c Client) CreateIdentity(req *CreateIdentityRequest) (*CreateIdentityResponse, error)
- func (c Client) CreateProvider(req *CreateProviderRequest) (*Provider, error)
- func (c Client) CreateToken(req *CreateTokenRequest) (*CreateTokenResponse, error)
- func (c Client) DeleteAccessKey(id uid.ID) error
- func (c Client) DeleteDestination(id uid.ID) error
- func (c Client) DeleteGrant(id uid.ID) error
- func (c Client) DeleteIdentity(id uid.ID) error
- func (c Client) DeleteProvider(id uid.ID) error
- func (c Client) GetGroup(id uid.ID) (*Group, error)
- func (c Client) GetIdentity(id uid.ID) (*Identity, error)
- func (c Client) GetProvider(id uid.ID) (*Provider, error)
- func (c Client) GetVersion() (*Version, error)
- func (c Client) Introspect() (*Introspect, error)
- func (c Client) ListAccessKeys(req ListAccessKeysRequest) ([]AccessKey, error)
- func (c Client) ListDestinations(req ListDestinationsRequest) ([]Destination, error)
- func (c Client) ListGrants(req ListGrantsRequest) ([]Grant, error)
- func (c Client) ListGroupGrants(id uid.ID) ([]Grant, error)
- func (c Client) ListGroups(req ListGroupsRequest) ([]Group, error)
- func (c Client) ListIdentities(req ListIdentitiesRequest) ([]Identity, error)
- func (c Client) ListIdentityGrants(id uid.ID) ([]Grant, error)
- func (c Client) ListIdentityGroups(id uid.ID) ([]Group, error)
- func (c Client) ListProviders(name string) ([]Provider, error)
- func (c Client) Login(req *LoginRequest) (*LoginResponse, error)
- func (c Client) Logout() error
- func (c Client) Setup() (*CreateAccessKeyResponse, error)
- func (c Client) SetupRequired() (*SetupRequiredResponse, error)
- func (c Client) UpdateDestination(req UpdateDestinationRequest) (*Destination, error)
- func (c Client) UpdateIdentity(req *UpdateIdentityRequest) (*Identity, error)
- func (c Client) UpdateProvider(req UpdateProviderRequest) (*Provider, error)
- type CreateAccessKeyRequest
- type CreateAccessKeyResponse
- type CreateDestinationRequest
- type CreateGrantRequest
- type CreateGroupRequest
- type CreateIdentityRequest
- type CreateIdentityResponse
- type CreateProviderRequest
- type CreateTokenRequest
- type CreateTokenResponse
- type Destination
- type DestinationConnection
- type Duration
- type EmptyRequest
- type EmptyResponse
- type Error
- type FieldError
- type Grant
- type Group
- type Identity
- type Introspect
- type ListAccessKeysRequest
- type ListDestinationsRequest
- type ListGrantsRequest
- type ListGroupsRequest
- type ListIdentitiesRequest
- type ListProvidersRequest
- type LoginRequest
- type LoginRequestOIDC
- type LoginRequestPasswordCredentials
- type LoginResponse
- type Provider
- type Resource
- type SetupRequiredResponse
- type Time
- type UpdateDestinationRequest
- type UpdateIdentityRequest
- type UpdateProviderRequest
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var ( fmt.Errorf("unauthorized") // ErrForbidden means you don't have permissions to the requested resource ErrForbidden = fmt.Errorf("forbidden") // ErrBadGateway means an invalid response was received from an upstream server (probably an OIDC provider) ErrBadGateway = fmt.Errorf("bad gateway") ErrDuplicate = fmt.Errorf("duplicate record") ErrNotFound = fmt.Errorf("record not found") ErrBadRequest = fmt.Errorf("bad request") ErrInternal = fmt.Errorf("internal error") )ErrUnauthorized =
Functions ¶
This section is empty.
Types ¶
type AccessKey ¶
type AccessKey struct { ID uid.ID `json:"id"` Created Time `json:"created"` Name string `json:"name"` IssuedFor uid.ID `json:"issuedFor"` Expires Time `json:"expires,omitempty" note:"key is no longer valid after this time"` ExtensionDeadline Time `json:"extensionDeadline" note:"key must be renewed after this time"` }
type Client ¶
func (Client) CreateAccessKey ¶
func (c Client) CreateAccessKey(req *CreateAccessKeyRequest) (*CreateAccessKeyResponse, error)
func (Client) CreateDestination ¶
func (c Client) CreateDestination(req *CreateDestinationRequest) (*Destination, error)
func (Client) CreateGrant ¶
func (c Client) CreateGrant(req *CreateGrantRequest) (*Grant, error)
func (Client) CreateGroup ¶
func (c Client) CreateGroup(req *CreateGroupRequest) (*Group, error)
func (Client) CreateIdentity ¶ added in v0.9.0
func (c Client) CreateIdentity(req *CreateIdentityRequest) (*CreateIdentityResponse, error)
func (Client) CreateProvider ¶
func (c Client) CreateProvider(req *CreateProviderRequest) (*Provider, error)
func (Client) CreateToken ¶
func (c Client) CreateToken(req *CreateTokenRequest) (*CreateTokenResponse, error)
func (Client) GetIdentity ¶ added in v0.9.0
func (Client) GetVersion ¶
func (Client) Introspect ¶
func (c Client) Introspect() (*Introspect, error)
func (Client) ListAccessKeys ¶
func (c Client) ListAccessKeys(req ListAccessKeysRequest) ([]AccessKey, error)
func (Client) ListDestinations ¶
func (c Client) ListDestinations(req ListDestinationsRequest) ([]Destination, error)
func (Client) ListGrants ¶
func (c Client) ListGrants(req ListGrantsRequest) ([]Grant, error)
func (Client) ListGroups ¶
func (c Client) ListGroups(req ListGroupsRequest) ([]Group, error)
func (Client) ListIdentities ¶ added in v0.9.0
func (c Client) ListIdentities(req ListIdentitiesRequest) ([]Identity, error)
func (Client) ListIdentityGrants ¶ added in v0.9.0
func (Client) ListIdentityGroups ¶ added in v0.9.0
func (Client) Login ¶
func (c Client) Login(req *LoginRequest) (*LoginResponse, error)
func (Client) Setup ¶
func (c Client) Setup() (*CreateAccessKeyResponse, error)
func (Client) SetupRequired ¶
func (c Client) SetupRequired() (*SetupRequiredResponse, error)
func (Client) UpdateDestination ¶
func (c Client) UpdateDestination(req UpdateDestinationRequest) (*Destination, error)
func (Client) UpdateIdentity ¶ added in v0.9.0
func (c Client) UpdateIdentity(req *UpdateIdentityRequest) (*Identity, error)
func (Client) UpdateProvider ¶
func (c Client) UpdateProvider(req UpdateProviderRequest) (*Provider, error)
type CreateAccessKeyRequest ¶
type CreateAccessKeyResponse ¶
type CreateAccessKeyResponse struct { ID uid.ID `json:"id"` Created Time `json:"created"` Name string `json:"name"` IssuedFor uid.ID `json:"issuedFor"` Expires Time `json:"expires" note:"after this deadline the key is no longer valid"` ExtensionDeadline Time `json:"extensionDeadline" note:"the key must be used by this time to remain valid"` AccessKey string `json:"accessKey"` }
type CreateDestinationRequest ¶
type CreateDestinationRequest struct { UniqueID string `json:"uniqueID"` Name string `json:"name" validate:"required"` Connection DestinationConnection `json:"connection"` }
type CreateGrantRequest ¶
type CreateGrantRequest struct { Subject uid.PolymorphicID `json:"subject" validate:"required" note:"a polymorphic field primarily expecting a user, machine, or group ID"` Privilege string `json:"privilege" validate:"required" example:"view" note:"a role or permission"` Resource string `` /* 129-byte string literal not displayed */ }
type CreateGroupRequest ¶
type CreateIdentityRequest ¶ added in v0.9.0
type CreateIdentityResponse ¶ added in v0.9.0
type CreateProviderRequest ¶
type CreateProviderRequest struct { Name string `json:"name" validate:"required" example:"okta"` URL string `json:"url" validate:"required" example:"infrahq.okta.com"` ClientID string `json:"clientID" example:"0oapn0qwiQPiMIyR35d6"` ClientSecret string `json:"clientSecret" example:"jmda5eG93ax3jMDxTGrbHd_TBGT6kgNZtrCugLbU"` }
type CreateTokenRequest ¶
type CreateTokenResponse ¶
type Destination ¶
type DestinationConnection ¶
type Duration ¶ added in v0.8.0
func (Duration) MarshalJSON ¶ added in v0.8.0
func (*Duration) UnmarshalJSON ¶ added in v0.8.0
type EmptyRequest ¶
type EmptyRequest struct{}
type EmptyResponse ¶
type EmptyResponse struct{}
type Error ¶
type Error struct { Code int32 `json:"code"` // should be a repeat of the http response status code Message string `json:"message"` FieldErrors []FieldError `json:"fieldErrors,omitempty"` }
type FieldError ¶
type Grant ¶
type Grant struct { ID uid.ID `json:"id"` Created Time `json:"created"` CreatedBy uid.ID `json:"created_by" note:"id of the identity that created the grant"` Updated Time `json:"updated"` Subject uid.PolymorphicID `json:"subject" note:"a polymorphic field primarily expecting an user, or group ID"` Privilege string `json:"privilege" note:"a role or permission"` Resource string `json:"resource" note:"a resource name in Infra's Universal Resource Notation"` }
type Introspect ¶
type Introspect struct { ID uid.ID `json:"id"` Name string `json:"name"` // the machine name or the user email IdentityType string `json:"identityType"` // user or machine }
Introspect returns information about the party that the calling token was issued for
type ListAccessKeysRequest ¶
type ListDestinationsRequest ¶
type ListGrantsRequest ¶
type ListGrantsRequest struct { Subject uid.PolymorphicID `form:"subject"` Resource string `form:"resource" example:"kubernetes.production"` Privilege string `form:"privilege" example:"view"` }
type ListGroupsRequest ¶
type ListIdentitiesRequest ¶ added in v0.9.0
type ListProvidersRequest ¶
type ListProvidersRequest struct {
Name string `form:"name" example:"okta"`
}
type LoginRequest ¶
type LoginRequest struct { AccessKey string `json:"accessKey" validate:"excluded_with=OIDC,excluded_with=PasswordCredentials"` PasswordCredentials *LoginRequestPasswordCredentials `json:"passwordCredentials" validate:"excluded_with=OIDC,excluded_with=AccessKey"` OIDC *LoginRequestOIDC `json:"oidc" validate:"excluded_with=KeyExchange,excluded_with=PasswordCredentials"` }
type LoginRequestOIDC ¶
type LoginRequestPasswordCredentials ¶ added in v0.6.0
type LoginResponse ¶
type Provider ¶
type Provider struct { ID uid.ID `json:"id"` Name string `json:"name" example:"okta"` Created Time `json:"created"` Updated Time `json:"updated"` URL string `json:"url" validate:"fqdn,required" example:"infrahq.okta.com"` ClientID string `json:"clientID" validate:"required" example:"0oapn0qwiQPiMIyR35d6"` }
type SetupRequiredResponse ¶
type SetupRequiredResponse struct {
Required bool `json:"required"`
}
type Time ¶ added in v0.8.0
func (*Time) MarshalJSON ¶ added in v0.8.0
func (*Time) UnmarshalJSON ¶ added in v0.8.0
type UpdateDestinationRequest ¶
type UpdateDestinationRequest struct { ID uid.ID `uri:"id" json:"-" validate:"required"` Name string `json:"name" validate:"required"` UniqueID string `json:"uniqueID"` Connection DestinationConnection `json:"connection"` }
type UpdateIdentityRequest ¶ added in v0.9.0
type UpdateProviderRequest ¶
type UpdateProviderRequest struct { ID uid.ID `uri:"id" json:"-" validate:"required"` Name string `json:"name" example:"okta"` URL string `json:"url" example:"infrahq.okta.com"` ClientID string `json:"clientID" example:"0oapn0qwiQPiMIyR35d6"` ClientSecret string `json:"clientSecret" example:"jmda5eG93ax3jMDxTGrbHd_TBGT6kgNZtrCugLbU"` }
Click to show internal directories.
Click to hide internal directories.