core

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitStores

func InitStores(ctx context.Context, stores []*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 Store

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

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