cmd

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const K_CACHE_PATH = "/var/cache/theo-agent"
View Source
const K_CONFIG_FILE = "/etc/theo-agent/config.yml"
View Source
const K_USER = "theo-agent"

Variables

This section is empty.

Functions

func Execute

func Execute()

func Install

func Install()

Install will update sshd_condif if requested, create cache directory

func Query

func Query(user string)

Query makes a request to Theo server at url sending auth token for the requested user

Types

type Config

type Config struct {
	URL            string `yaml:"url"`
	Token          string
	Cachedir       string
	Verify         bool
	PublicKey      StringArray `yaml:"public_key"`
	Timeout        int64
	HostnamePrefix string `yaml:"hostname-prefix"`
	HostnameSuffix string `yaml:"hostname-suffix"`
}

type Key

type Key struct {
	PublicKey    string `json:"public_key"`
	PublicKeySig string `json:"public_key_sig"`
	Account      string `json:"email"`
	SSHOptions   string `json:"ssh_options"`
}

Key is the object returned by theo-node

type SshConfig

type SshConfig struct {
	// contains filtered or unexported fields
}

type StringArray

type StringArray []string

func (*StringArray) UnmarshalYAML

func (a *StringArray) UnmarshalYAML(unmarshal func(interface{}) error) error

type Verifier

type Verifier interface {
	// Sign returns raw signature for the given data. This method
	// will apply the hash specified for the keytype to the data.
	Verify(data []byte, sig []byte) error
}

Verifier verifies signature against a public key.

Jump to

Keyboard shortcuts

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