command

package
v0.0.0-...-3abe282 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Address string
	Logger  zerolog.Logger
	Handler clients.Handler
}

Client contains methods for command related resource actions.

func NewClient

func NewClient(address string, log zerolog.Logger, handler clients.Handler) *Client

NewClient creates a new command provider.

func (*Client) AddRelationshipToPlatform

func (c *Client) AddRelationshipToPlatform(commandID int, platformID int) error

AddRelationshipToPlatform adds a relationship to a platform.

func (*Client) AddRelationshipToRepository

func (c *Client) AddRelationshipToRepository(commandID int, repositoryID int) error

AddRelationshipToRepository adds a relationship to a repository.

func (*Client) Create

func (c *Client) Create(command *models.Command) (*models.Command, error)

Create creates a new command resource.

func (*Client) Delete

func (c *Client) Delete(id int) error

Delete deletes a command resource.

func (*Client) Get

func (c *Client) Get(id int) (*models.Command, error)

Get returns a command resource.

func (*Client) List

func (c *Client) List(opts *models.ListOptions) ([]*models.Command, error)

List repositories.

func (*Client) RemoveRelationshipToPlatform

func (c *Client) RemoveRelationshipToPlatform(commandID int, platformID int) error

RemoveRelationshipToPlatform adds a relationship to a platform.

func (*Client) RemoveRelationshipToRepository

func (c *Client) RemoveRelationshipToRepository(commandID int, repositoryID int) error

RemoveRelationshipToRepository adds a relationship to a repository.

func (*Client) Update

func (c *Client) Update(repo *models.Command) (*models.Command, error)

Update updates a command resource.

Jump to

Keyboard shortcuts

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