client

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTokenPath = "/var/run/secrets/token/burrito"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetPlan(namespace string, layer string, run string, attempt string, format string) ([]byte, error)
	PutPlan(namespace string, layer string, run string, attempt string, format string, content []byte) error
	GetLogs(namespace string, layer string, run string, attempt string) ([]string, error)
	PutLogs(namespace string, layer string, run string, attempt string, content []byte) error
	PutGitBundle(namespace, name, ref, revision string, bundle []byte) error
	CheckGitBundle(namespace, name, ref, revision string) (bool, error)
}

type DefaultClient

type DefaultClient struct {
	Hostname string
	// contains filtered or unexported fields
}

func NewDefaultClient

func NewDefaultClient(config config.DatastoreConfig) *DefaultClient

func (*DefaultClient) CheckGitBundle added in v0.6.0

func (c *DefaultClient) CheckGitBundle(namespace, name, ref, revision string) (bool, error)

func (*DefaultClient) GetLogs

func (c *DefaultClient) GetLogs(namespace string, layer string, run string, attempt string) ([]string, error)

func (*DefaultClient) GetPlan

func (c *DefaultClient) GetPlan(namespace string, layer string, run string, attempt string, format string) ([]byte, error)

func (*DefaultClient) PutGitBundle added in v0.6.0

func (c *DefaultClient) PutGitBundle(namespace, name, ref, revision string, bundle []byte) error

func (*DefaultClient) PutLogs

func (c *DefaultClient) PutLogs(namespace string, layer string, run string, attempt string, content []byte) error

func (*DefaultClient) PutPlan

func (c *DefaultClient) PutPlan(namespace string, layer string, run string, attempt string, format string, content []byte) error

type MockClient

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

func NewMockClient

func NewMockClient() *MockClient

func (*MockClient) CheckGitBundle added in v0.6.0

func (c *MockClient) CheckGitBundle(namespace, name, ref, revision string) (bool, error)

func (*MockClient) GetAttempts

func (c *MockClient) GetAttempts(namespace string, layer string, run string) (int, error)

func (*MockClient) GetLogs

func (c *MockClient) GetLogs(namespace string, layer string, run string, attempt string) ([]string, error)

func (*MockClient) GetPlan

func (c *MockClient) GetPlan(namespace string, layer string, run string, attempt string, format string) ([]byte, error)

func (*MockClient) PutGitBundle added in v0.6.0

func (c *MockClient) PutGitBundle(namespace, name, ref, revision string, bundle []byte) error

func (*MockClient) PutLogs

func (c *MockClient) PutLogs(namespace string, layer string, run string, attempt string, content []byte) error

func (*MockClient) PutPlan

func (c *MockClient) PutPlan(namespace string, layer string, run string, attempt string, format string, content []byte) error

Jump to

Keyboard shortcuts

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