restapi

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION_STRING = "0.1.0"

Variables

View Source
var RuntimeReply = Runtime{
	Versions: Versions{
		Software:       &version.VERSION,
		Api:            &VERSION,
		ClientRelay:    &clientrelay.T.Version,
		ClientDir:      &clientdir.T.Version,
		ClientContract: &clientcontract.T.Version,
	},
	Upgrade: Upgrade{Supported: upgrade.Supported},
	Build: Build{
		GitCommit: version.GIT_COMMIT,
		GoVersion: runtime.Version(),
		Time:      version.BUILD_TIME,
		Flags:     version.BUILD_FLAGS,
	},
	Platform: Platform{
		Os:   runtime.GOOS,
		Arch: runtime.GOARCH,
	},
}

Functions

func UnixServer

func UnixServer(p string, rts provide.Routes) error

Types

type AccesskeyImportRequest

type AccesskeyImportRequest struct {
	URL *texturl.URL `json:"url"`
}

type AccesskeyReply

type AccesskeyReply struct {
	Contract   *texturl.URL `json:"contract"`
	Duration   int64        `json:"duration"`
	State      string       `json:"state"`
	Expiration int64        `json:"expiration"`
}

type Build

type Build struct {
	GitCommit string `json:"gitcommit"`
	GoVersion string `json:"goversion"`
	Time      string `json:"time"`
	Flags     string `json:"flags"`
}

type FwderReply

type FwderReply struct {
	Pid     int         `json:"pid"`
	State   string      `json:"state"`
	Address string      `json:"address"`
	Binary  binaryReply `json:"binary"`
}

type FwderState

type FwderState struct {
	State string `json:"state"`
}

type Platform

type Platform struct {
	Os   string `json:"os"`
	Arch string `json:"arch"`
}

type Runtime

type Runtime struct {
	Versions Versions `json:"versions"`
	Upgrade  Upgrade  `json:"upgrade"`
	Build    Build    `json:"build"`
	Platform Platform `json:"platform"`
}

type StatusBroker

type StatusBroker struct {
	ActiveCircuit []string `json:"active_circuit"`
}

type StatusReply

type StatusReply struct {
	Home    string         `json:"home"`
	Pid     int            `json:"pid"`
	State   string         `json:"state"`
	Broker  StatusBroker   `json:"broker"`
	Upgrade *StatusUpgrade `json:"upgrade,omitempty"`
}

type StatusUpgrade

type StatusUpgrade struct {
	Required bool `json:"required"`
}

type T

type T struct {
	http.Handler
	// contains filtered or unexported fields
}

api server stub

func New

func New(br *broker.T, l *log.Logger) (t *T)

type Upgrade

type Upgrade struct {
	Supported bool `json:"supported"`
}

type Version

type Version struct {
	Version semver.Version `json:"version,omitempty"`
}

type Versions

type Versions struct {
	Software       *semver.Version `json:"software"`
	Api            *semver.Version `json:"api"`
	ClientRelay    *semver.Version `json:"client-relay"`
	ClientDir      *semver.Version `json:"client-dir"`
	ClientContract *semver.Version `json:"client-contract"`
}

Jump to

Keyboard shortcuts

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