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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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