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) 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) GetProvider(id uid.ID) (*Provider, error)
- func (c Client) GetUser(id uid.ID) (*User, error)
- func (c Client) GetVersion() (*Version, 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) 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) 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 ListDestinationsRequest
- type ListGrantsRequest
- type ListGroupsRequest
- type ListMachinesRequest
- type ListProvidersRequest
- type ListUsersRequest
- type LoginRequest
- type LoginResponse
- type Machine
- type Provider
- type Resource
- 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 AccessKey ¶ added in v0.5.4
type AccessKey struct { ID uid.ID `json:"id"` Created time.Time `json:"created"` Expires time.Time `json:"expires,omitempty"` Name string `json:"name"` Permissions []string `json:"permissions"` }
InfraAccessKey struct for InfraAccessKey
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) 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) 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) 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 CreateAccessKeyResponse ¶ added in v0.5.4
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 CreateGroupRequest ¶ added in v0.5.0
type CreateMachineRequest ¶ added in v0.5.4
type CreateMachineRequest struct { Name string `json:"name"` Description string `json:"description"` Permissions []string `json:"permissions"` }
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 string `json:"identity"` // format is "u:<idstr>" for users, "g:<idstr>" for groups 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 ListDestinationsRequest ¶ added in v0.5.0
type ListGrantsRequest ¶ added in v0.5.0
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 LoginResponse ¶ added in v0.2.3
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"` Permissions []string `json:"permissions"` }
Machine struct for Machine Identities
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.