Documentation ¶
Index ¶
- Variables
- type APIToken
- type Client
- func (c Client) CreateAPIToken(req *CreateAPITokenRequest) (*CreateAPITokenResponse, 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) 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) 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) 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 CreateAPITokenRequest
- type CreateAPITokenResponse
- type CreateDestinationRequest
- type CreateGrantRequest
- type CreateGroupRequest
- 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 ListProvidersRequest
- type ListUsersRequest
- type LoginRequest
- type LoginResponse
- 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 APIToken ¶ added in v0.5.0
type APIToken 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"` }
InfraAPIToken struct for InfraAPIToken
type Client ¶ added in v0.5.0
func (Client) CreateAPIToken ¶ added in v0.5.0
func (c Client) CreateAPIToken(req *CreateAPITokenRequest) (*CreateAPITokenResponse, 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) 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) 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 CreateAPITokenRequest ¶ added in v0.5.0
type CreateAPITokenResponse ¶ added in v0.5.0
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 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 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 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.