Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Create(ctx context.Context, params *RobotCreateParameters) (*RobotResponse, error)
- func (c *Client) CreateTeamMembership(ctx context.Context, id uuid.UUID, ...) error
- func (c *Client) Delete(ctx context.Context, id uuid.UUID) error
- func (c *Client) DeleteTeamMembership(ctx context.Context, id uuid.UUID, ...) error
- func (c *Client) Get(ctx context.Context, id uuid.UUID) (*RobotResponse, error)
- func (c *Client) ListTokens(ctx context.Context, id uuid.UUID) (*tokens.TokensResponse, error)
- type RobotAttributes
- type RobotCreateParameters
- type RobotOwner
- type RobotOwnerData
- type RobotOwnerType
- type RobotRelationships
- type RobotResponse
- type RobotTeamMembershipRelationshipList
- type RobotTeamMembershipResourceIdentifier
- type RobotsResponse
Constants ¶
const ( RobotOwnerOrganization RobotOwnerType = "organization" RobotTeamMembershipTypeTeam string = "teams" )
Robots can be owned by an organization.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*up.Config
}
Client is an robots client.
func NewClient ¶
func NewClient(cfg *up.Config) *Client
NewClient builds an robots client from the passed config.
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, params *RobotCreateParameters) (*RobotResponse, error)
Create a robot on Upbound.
func (*Client) CreateTeamMembership ¶ added in v1.8.0
func (c *Client) CreateTeamMembership(ctx context.Context, id uuid.UUID, params *RobotTeamMembershipResourceIdentifier) error
CreateTeamMembership create a robot team membership on Upbound.
func (*Client) DeleteTeamMembership ¶ added in v1.8.0
func (c *Client) DeleteTeamMembership(ctx context.Context, id uuid.UUID, params *RobotTeamMembershipResourceIdentifier) error
DeleteTeamMembership delete a robot team membership on Upbound.
func (*Client) ListTokens ¶
ListTokens lists tokens for a robot on Upbound.
type RobotAttributes ¶
RobotAttributes are the attributes of a robot.
type RobotCreateParameters ¶
type RobotCreateParameters struct { Attributes RobotAttributes `json:"attributes"` Relationships RobotRelationships `json:"relationships,omitempty"` }
RobotCreateParameters are the parameters for creating a robot.
type RobotOwner ¶
type RobotOwner struct {
Data RobotOwnerData `json:"data"`
}
RobotOwner represents owner of a robot.
type RobotOwnerData ¶
type RobotOwnerData struct { Type RobotOwnerType `json:"type"` ID string `json:"id"` }
RobotOwnerData describes a robot owner.
type RobotRelationships ¶
type RobotRelationships struct {
Owner RobotOwner `json:"organization"`
}
RobotRelationships represents relationships for a robot.
type RobotResponse ¶
RobotResponse is the response returned from robot operations. TODO(hasheddan): consider making robot responses strongly typed.
type RobotTeamMembershipRelationshipList ¶ added in v1.8.0
type RobotTeamMembershipRelationshipList struct {
Data []RobotTeamMembershipResourceIdentifier `json:"data"`
}
RobotTeamMembershipRelationshipList represents RobotTeamMembershipResourceIdentifier relationships.
type RobotTeamMembershipResourceIdentifier ¶ added in v1.8.0
type RobotTeamMembershipResourceIdentifier struct { Type string `json:"type"` ID string `json:"id"` }
RobotTeamMembershipResourceIdentifier are the attributes of a robot team membership.
type RobotsResponse ¶
RobotsResponse is the response returned from robot operations. TODO(hasheddan): consider making robot responses strongly typed.