core

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitStores

func InitStores(ctx context.Context, majordomo majordomo.Service, storeDefinitions []*Store) ([]e2wtypes.Store, error)

InitStores initialises the stores from a configuration.

Types

type Endpoint

type Endpoint struct {
	ID   uint64 `mapstructure:"id"`
	Name string `mapstructure:"name"`
	Port uint32 `mapstructure:"port"`
}

Endpoint contains information about an endpoint.

func (*Endpoint) ConnectAddress

func (e *Endpoint) ConnectAddress() string

ConnectAddress returns an address suitable for connecting to the endpoint.

func (*Endpoint) String

func (e *Endpoint) String() string

String returns a human-readable representation of the endpoint.

type Result

type Result int

Result represents the result of a process.

const (
	ResultUnknown Result = iota
	ResultSucceeded
	ResultDenied
	ResultFailed
)

Possible results of a process.

func (Result) String

func (r Result) String() string

type S3Store added in v1.2.0

type S3Store struct {
	Region      string              `mapstructure:"region"`
	ID          string              `mapstructure:"id"`
	Bucket      string              `mapstructure:"bucket"`
	Path        string              `mapstructure:"path"`
	Endpoint    string              `mapstructure:"endpoint"`
	Credentials *S3StoreCredentials `mapstructure:"credentials"`
}

S3Store defines an S3 store.

type S3StoreCredentials added in v1.2.0

type S3StoreCredentials struct {
	ID     string `mapstructure:"id"`
	Secret string `mapstructure:"secret"`
}

S3StoreCredentials defines credentials for an S3 store.

type Store

type Store struct {
	Name       string   `mapstructure:"name"`
	Type       string   `mapstructure:"type"`
	Location   string   `mapstructure:"location"`
	Passphrase string   `mapstructure:"passphrase"`
	S3         *S3Store `mapstructure:"s3"`
}

Store defines a single store.

type Stores

type Stores struct {
	Stores []*Store `mapstructure:"stores"`
}

Stores defines all stores.

Jump to

Keyboard shortcuts

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