robots

package
v1.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
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) Delete

func (c *Client) Delete(ctx context.Context, id uuid.UUID) error

Delete an robot 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) Get

func (c *Client) Get(ctx context.Context, id uuid.UUID) (*RobotResponse, error)

Get gets a robot on Upbound.

func (*Client) ListTokens

func (c *Client) ListTokens(ctx context.Context, id uuid.UUID) (*tokens.TokensResponse, error)

ListTokens lists tokens for a robot on Upbound.

type RobotAttributes

type RobotAttributes struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

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 RobotOwnerType

type RobotOwnerType string

RobotOwnerType is the type of owner of the robot.

type RobotRelationships

type RobotRelationships struct {
	Owner RobotOwner `json:"organization"`
}

RobotRelationships represents relationships for a robot.

type RobotResponse

type RobotResponse struct {
	common.DataSet `json:"data"`
}

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

type RobotsResponse struct {
	DataSet []common.DataSet `json:"data"`
}

RobotsResponse is the response returned from robot operations. TODO(hasheddan): consider making robot responses strongly typed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL