remote

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	AuthorEmail   string
	AuthorName    string
	CommitMessage string
	Content       checks.GlobalTarget
	Name          string
}

File represents a file in the global targets repository

func (*File) Serialize added in v0.5.0

func (f *File) Serialize(branch string) (b []byte, err error)

Serialize serializes the file to a byte slice. The branch is used to determine the branch to commit to The serialized file is base64 encoded.

func (*File) SetFileName

func (f *File) SetFileName(name string)

SetFileName sets the filename of the File

type Interactor

type Interactor interface {
	// FetchFiles fetches the files from the global targets repository
	FetchFiles(ctx context.Context) ([]checks.GlobalTarget, error)
	// PutFile updates the file in the repository
	PutFile(ctx context.Context, file File) error
	// PostFile creates the file in the repository
	PostFile(ctx context.Context, file File) error
	// DeleteFile deletes the file from the repository
	DeleteFile(ctx context.Context, file File) error
}

Interactor handles the interaction with the remote state backend It is responsible for CRUD operations on the global targets repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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