connect

package
v0.0.0-...-c241bcf Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CHANGES   = "/changes/"
	DETAIL    = "/detail"
	REVIEW    = "/review"
	REVISIONS = "/revisions/"
	VERSION   = "/config/server/version"

	PREFIX = "/a"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Rest

type Rest interface {
	Init(context.Context) error
	Deinit(context.Context) error
	Detail(context.Context, int) (map[string]any, error)
	Query(context.Context, string, int) (map[string]any, error)
	Version(context.Context) (string, error)
	Vote(context.Context, int, int, string, string, string) error
}

func RestNew

func RestNew(_ context.Context, cfg *RestConfig) Rest

type RestConfig

type RestConfig struct {
	Config config.Config
	Logger hclog.Logger
}

func DefaultRestConfig

func DefaultRestConfig() *RestConfig

type Ssh

type Ssh interface {
	Init(context.Context) error
	Deinit(context.Context) error
	Reconnect(context.Context) error
	Run(context.Context, string) (string, error)
	Start(context.Context, string, chan string) error
}

func SshNew

func SshNew(_ context.Context, cfg *SshConfig) Ssh

type SshConfig

type SshConfig struct {
	Config config.Config
	Logger hclog.Logger
}

func DefaultSshConfig

func DefaultSshConfig() *SshConfig

Jump to

Keyboard shortcuts

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