robots

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the given error is a not found error.

func NewNotFound

func NewNotFound() error

NewNotFound returns a new not found error.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client that can be used to interact with the robots service.

func NewClient

func NewClient(host *url.URL) *Client

NewClient returns a new client that can be used to interact with the robots service.

func (*Client) Create

func (c *Client) Create(ctx context.Context, r *Robot) error

Create creates the given robot.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, name string) error

Delete deletes the robot with the given name.

func (*Client) Get

func (c *Client) Get(ctx context.Context, name string) (*Robot, error)

Get returns the robot with the given name.

func (*Client) Update

func (c *Client) Update(ctx context.Context, r *Robot) error

Update updates the given robot.

type Robot

type Robot struct {
	Name  string `json:"name"`
	Color string `json:"color"`
}

Robot is a simple client-side struct that represents a robot.

Jump to

Keyboard shortcuts

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