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) CreateMachine(req *CreateMachineRequest) (*Machine, error)
- func (c Client) CreateProvider(req *CreateProviderRequest) (*Provider, error)
- func (c Client) CreateToken(req *CreateTokenRequest) (*CreateTokenResponse, error)
- func (c Client) CreateUser(req *CreateUserRequest) (*User, 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) DeleteMachine(id uid.ID) error
- func (c Client) DeleteProvider(id uid.ID) error
- func (c Client) GetGroup(id uid.ID) (*Group, error)
- func (c Client) GetMachine(id uid.ID) (*Machine, error)
- func (c Client) GetProvider(id uid.ID) (*Provider, error)
- func (c Client) GetUser(id uid.ID) (*User, 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) ListMachineGrants(id uid.ID) ([]Grant, error)
- func (c Client) ListMachines(req ListMachinesRequest) ([]Machine, error)
- func (c Client) ListProviders(name string) ([]Provider, error)
- func (c Client) ListUserGrants(id uid.ID) ([]Grant, error)
- func (c Client) ListUserGroups(id uid.ID) ([]Group, error)
- func (c Client) ListUsers(req ListUsersRequest) ([]User, 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) UpdateProvider(req UpdateProviderRequest) (*Provider, error)
- type CreateAccessKeyRequest
- type CreateAccessKeyResponse
- type CreateDestinationRequest
- type CreateGrantRequest
- type CreateGroupRequest
- type CreateMachineRequest
- type CreateProviderRequest
- type CreateTokenRequest
- type CreateTokenResponse
- type CreateUserRequest
- type Destination
- type DestinationConnection
- type EmptyRequest
- type EmptyResponse
- type Error
- type Grant
- type Group
- type Introspect
- type ListAccessKeysRequest
- type ListDestinationsRequest
- type ListGrantsRequest
- type ListGroupsRequest
- type ListMachinesRequest
- type ListProvidersRequest
- type ListUsersRequest
- type LoginRequest
- type LoginRequestOIDC
- type LoginResponse
- type Machine
- type Provider
- type Resource
- type SetupRequiredResponse
- type UpdateDestinationRequest
- type UpdateProviderRequest
- type User
- 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") 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 Client ¶ added in v0.5.0
func (Client) CreateAccessKey ¶ added in v0.5.4
func (c Client) CreateAccessKey(req *CreateAccessKeyRequest) (*CreateAccessKeyResponse, error)
func (Client) CreateDestination ¶ added in v0.5.0
func (c Client) CreateDestination(req *CreateDestinationRequest) (*Destination, error)
func (Client) CreateGrant ¶ added in v0.5.0
func (c Client) CreateGrant(req *CreateGrantRequest) (*Grant, error)
func (Client) CreateGroup ¶ added in v0.5.0
func (c Client) CreateGroup(req *CreateGroupRequest) (*Group, error)
func (Client) CreateMachine ¶ added in v0.5.4
func (c Client) CreateMachine(req *CreateMachineRequest) (*Machine, error)
func (Client) CreateProvider ¶ added in v0.5.0
func (c Client) CreateProvider(req *CreateProviderRequest) (*Provider, error)
func (Client) CreateToken ¶ added in v0.5.0
func (c Client) CreateToken(req *CreateTokenRequest) (*CreateTokenResponse, error)
func (Client) CreateUser ¶ added in v0.5.0
func (c Client) CreateUser(req *CreateUserRequest) (*User, error)
func (Client) DeleteDestination ¶ added in v0.5.0
func (Client) GetProvider ¶ added in v0.5.0
func (Client) GetVersion ¶ added in v0.5.0
func (Client) Introspect ¶ added in v0.5.8
func (c Client) Introspect() (*Introspect, error)
func (Client) ListAccessKeys ¶ added in v0.5.8
func (c Client) ListAccessKeys(req ListAccessKeysRequest) ([]AccessKey, error)
func (Client) ListDestinations ¶ added in v0.5.0
func (c Client) ListDestinations(req ListDestinationsRequest) ([]Destination, error)
func (Client) ListGrants ¶ added in v0.5.0
func (c Client) ListGrants(req ListGrantsRequest) ([]Grant, error)
func (Client) ListGroupGrants ¶ added in v0.5.0
func (Client) ListGroups ¶ added in v0.5.0
func (c Client) ListGroups(req ListGroupsRequest) ([]Group, error)
func (Client) ListMachineGrants ¶ added in v0.5.8
func (Client) ListMachines ¶ added in v0.5.4
func (c Client) ListMachines(req ListMachinesRequest) ([]Machine, error)
func (Client) ListProviders ¶ added in v0.5.0
func (Client) ListUserGrants ¶ added in v0.5.0
func (Client) ListUserGroups ¶ added in v0.5.0
func (Client) ListUsers ¶ added in v0.5.0
func (c Client) ListUsers(req ListUsersRequest) ([]User, error)
func (Client) Login ¶ added in v0.5.0
func (c Client) Login(req *LoginRequest) (*LoginResponse, error)
func (Client) Setup ¶ added in v0.5.9
func (c Client) Setup() (*CreateAccessKeyResponse, error)
func (Client) SetupRequired ¶ added in v0.5.9
func (c Client) SetupRequired() (*SetupRequiredResponse, error)
func (Client) UpdateDestination ¶ added in v0.5.0
func (c Client) UpdateDestination(req UpdateDestinationRequest) (*Destination, error)
func (Client) UpdateProvider ¶ added in v0.5.0
func (c Client) UpdateProvider(req UpdateProviderRequest) (*Provider, error)
type CreateAccessKeyRequest ¶ added in v0.5.4
type CreateAccessKeyRequest struct { MachineID uid.ID `json:"machineID" validate:"required"` Name string `json:"name"` TTL string `json:"ttl"` // maximum time valid ExtensionDeadline string `json:"extensionDeadline,omitempty"` // the access key must be used within this amount of time to renew validity }
type CreateAccessKeyResponse ¶ added in v0.5.4
type CreateAccessKeyResponse struct { ID uid.ID `json:"id"` Created time.Time `json:"created"` Name string `json:"name"` IssuedFor uid.PolymorphicID `json:"issuedFor"` Expires time.Time `json:"expires"` // after this deadline the key is no longer valid ExtensionDeadline time.Time `json:"extensionDeadline"` // the key must be used by this time to remain valid AccessKey string `json:"accessKey"` }
type CreateDestinationRequest ¶ added in v0.5.0
type CreateDestinationRequest struct { UniqueID string `json:"uniqueID"` Name string `json:"name" validate:"required"` Connection DestinationConnection `json:"connection"` }
type CreateGrantRequest ¶ added in v0.5.0
type CreateGrantRequest struct { Identity uid.PolymorphicID `json:"identity" validate:"required"` Resource string `json:"resource" validate:"required"` Privilege string `json:"privilege" validate:"required"` }
type CreateGroupRequest ¶ added in v0.5.0
type CreateMachineRequest ¶ added in v0.5.4
type CreateMachineRequest struct { Name string `json:"name"` Description string `json:"description"` }
CreateMachineRequest struct for CreateMachineRequest
type CreateProviderRequest ¶ added in v0.5.0
type CreateTokenRequest ¶ added in v0.5.0
type CreateTokenResponse ¶ added in v0.5.0
type CreateUserRequest ¶ added in v0.5.0
type Destination ¶
type Destination struct { ID uid.ID `json:"id"` UniqueID string `json:"uniqueID" form:"uniqueID"` Name string `json:"name" form:"name"` // created time in seconds since 1970-01-01 Created int64 `json:"created"` // updated time in seconds since 1970-01-01 Updated int64 `json:"updated"` Connection DestinationConnection `json:"connection"` }
type DestinationConnection ¶ added in v0.5.0
type EmptyRequest ¶ added in v0.5.0
type EmptyRequest struct{}
type EmptyResponse ¶ added in v0.5.0
type EmptyResponse struct{}
type Grant ¶ added in v0.5.0
type Grant struct { ID uid.ID `json:"id"` Created int64 `json:"created"` // created time in seconds since 1970-01-01 00:00:00 UTC CreatedBy uid.ID `json:"created_by"` // id of user who created the grant Updated int64 `json:"updated"` // updated time in seconds since 1970-01-01 00:00:00 UTC Identity uid.PolymorphicID `json:"identity"` Privilege string `json:"privilege"` // role or permission Resource string `json:"resource"` // Universal Resource Notation ExpiresAt *int64 `json:"expires_at"` // time this grant expires at in seconds since 1970-01-01 00:00:00 UTC }
type Introspect ¶ added in v0.5.8
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 ¶ added in v0.5.8
type ListDestinationsRequest ¶ added in v0.5.0
type ListGrantsRequest ¶ added in v0.5.0
type ListGrantsRequest struct { Identity uid.PolymorphicID `form:"identity"` Resource string `form:"resource"` Privilege string `form:"privilege"` }
type ListGroupsRequest ¶ added in v0.5.0
type ListMachinesRequest ¶ added in v0.5.4
type ListMachinesRequest struct {
Name string `form:"name"`
}
type ListProvidersRequest ¶ added in v0.5.0
type ListProvidersRequest struct {
Name string `form:"name"`
}
type ListUsersRequest ¶ added in v0.5.0
type LoginRequest ¶
type LoginRequest struct { OIDC *LoginRequestOIDC `json:"oidc" validate:"excluded_with=KeyExchange"` AccessKey string `json:"accessKey" validate:"excluded_with=OIDC"` }
type LoginRequestOIDC ¶ added in v0.5.9
type LoginResponse ¶ added in v0.2.3
type LoginResponse struct { PolymorphicID uid.PolymorphicID `json:"polymorphicId"` Name string `json:"name"` AccessKey string `json:"accessKey"` }
type Machine ¶ added in v0.5.4
type Machine struct { ID uid.ID `json:"id"` Created int64 `json:"created"` // updated time in seconds since 1970-01-01 Updated int64 `json:"updated"` // timestamp of this machine's last interaction with Infra in seconds since 1970-01-01 LastSeenAt int64 `json:"lastSeenAt"` Name string `json:"name"` Description string `json:"description"` }
Machine struct for Machine Identities
type SetupRequiredResponse ¶ added in v0.5.9
type SetupRequiredResponse struct {
Required bool `json:"required"`
}
type UpdateDestinationRequest ¶ added in v0.5.0
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 UpdateProviderRequest ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.