restserverclient

package
v0.0.0-...-ede9753 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderBobExists = "Bob-Exists"
)

Variables

View Source
var (
	ErrCantMakeRequest     = fmt.Errorf("failed to make the request")
	ErrInvalidStatusCode   = fmt.Errorf("failed request, invalid status code")
	ErrCantReadResponse    = fmt.Errorf("can not read response from server")
	ErrInvalidJsonResponse = fmt.Errorf("invalid response from the server")
	ErrItemNotFound        = fmt.Errorf("desired Item not found")
)

Functions

This section is empty.

Types

type C

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

func New

func New(address string, apiKey []byte) (*C, error)

Creates New Client from the address without the protocol

func (*C) Artifact

func (c *C) Artifact(projectId string, hash string) (*generated.Artifact, error)

func (*C) ArtifactCreate

func (c *C) ArtifactCreate(projectId string, hash string, src string) (err error)

func (*C) ArtifactDelete

func (c *C) ArtifactDelete(projectId string, hash string) error

func (*C) ArtifactExists

func (c *C) ArtifactExists(projectId string, hash string) (bool, error)

func (*C) Health

func (c *C) Health() bool

func (*C) Project

func (c *C) Project(projectId string) (*generated.ExtendedProject, error)

func (*C) ProjectCreate

func (c *C) ProjectCreate(project generated.ProjectCreate) (*generated.ExtendedProject, error)

func (*C) ProjectDelete

func (c *C) ProjectDelete(projectId string) error

func (*C) ProjectExists

func (c *C) ProjectExists(name string) (bool, error)

func (*C) Projects

func (c *C) Projects() ([]generated.Project, error)

Jump to

Keyboard shortcuts

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