network

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(token string, url string, filepath string) error

func HttpClientDownloadFile

func HttpClientDownloadFile(url, localPath string)

func SshExec

func SshExec(address string, username string, keyfile string, certfile string, cmd string)

func WriteZitiControllerConfig

func WriteZitiControllerConfig(filename string, cfg ZitiControllerConfig) error

func WriteZitiRouterConfig

func WriteZitiRouterConfig(filename string, cfg ZitiRouterConfig) error

func ZitiAuthenticate

func ZitiAuthenticate(url, user, pass string) (string, error)

func ZitiClient

func ZitiClient(id string) *http.Client

func ZitiCreateEdgeRouterPolicy

func ZitiCreateEdgeRouterPolicy(url, token, name string, routers, services, roles []string) error

func ZitiCreateService

func ZitiCreateService(url, token, name, hostV1, interceptV1 string) (string, error)

func ZitiCreateServiceConfig

func ZitiCreateServiceConfig(url, token, name, configType string, config map[string]interface{}) (string, error)

func ZitiCreateServicePolicy

func ZitiCreateServicePolicy(url, token, name, policyType, serviceID, identity string) (string, error)

func ZitiGenerateCtrlConfig

func ZitiGenerateCtrlConfig(outFile string)

func ZitiGenerateRouterConfig

func ZitiGenerateRouterConfig(outFile string)

func ZitiGetConfigTypes

func ZitiGetConfigTypes(url, token, name string) (string, error)

func ZitiGetIdentity

func ZitiGetIdentity(urlSrc, token, name string) (string, error)

func ZitiIdentities

func ZitiIdentities(urlSrc, token string)

func ZitiServicePolicies

func ZitiServicePolicies(url, token string)

Types

type WriteCounter

type WriteCounter struct {
	Total uint64
}

func (WriteCounter) PrintProgress

func (wc WriteCounter) PrintProgress()

func (*WriteCounter) Write

func (wc *WriteCounter) Write(p []byte) (int, error)

type ZitiAPIBinding

type ZitiAPIBinding struct {
	Binding string `yaml:"binding"`
}

type ZitiBindPoint

type ZitiBindPoint struct {
	Interface string `yaml:"interface"`
	Address   string `yaml:"address"`
}

type ZitiCSR

type ZitiCSR struct {
	Country            string   `yaml:"country"`
	Province           string   `yaml:"province"`
	Locality           string   `yaml:"locality"`
	Organization       string   `yaml:"organization"`
	OrganizationalUnit string   `yaml:"organizationalUnit"`
	SANs               ZitiSANs `yaml:"sans"`
}

type ZitiControllerConfig

type ZitiControllerConfig struct {
	Version  int               `yaml:"v"`
	DB       string            `yaml:"db"`
	Identity ZitiIdentity      `yaml:"identity"`
	Ctrl     ZitiCtrlListener  `yaml:"ctrl"`
	Edge     ZitiEdgeEnroll    `yaml:"edge"`
	Web      []ZitiWebListener `yaml:"web"`
}

type ZitiCtrlEndpoint

type ZitiCtrlEndpoint struct {
	Endpoint string `yaml:"endpoint"`
}

type ZitiCtrlListener

type ZitiCtrlListener struct {
	Listener string `yaml:"listener"`
}

type ZitiDialer

type ZitiDialer struct {
	Binding string `yaml:"binding"`
}

type ZitiEdgeCSR

type ZitiEdgeCSR struct {
	CSR ZitiCSR `yaml:"csr"`
}

type ZitiEdgeEnroll

type ZitiEdgeEnroll struct {
	Enrollment ZitiEnrollment `yaml:"enrollment"`
}

type ZitiEnrollment

type ZitiEnrollment struct {
	SigningCert ZitiSigningCert `yaml:"signingCert"`
}

type ZitiIdentity

type ZitiIdentity struct {
	Cert       string `yaml:"cert"`
	ServerCert string `yaml:"server_cert"`
	Key        string `yaml:"key"`
	CA         string `yaml:"ca"`
}

type ZitiLinkConfig

type ZitiLinkConfig struct {
	Listeners []ZitiLinkListener `yaml:"listeners"`
	Dialers   []ZitiDialer       `yaml:"dialers"`
}

type ZitiLinkListener

type ZitiLinkListener struct {
	Binding   string `yaml:"binding"`
	Bind      string `yaml:"bind"`
	Advertise string `yaml:"advertise"`
}

type ZitiListener

type ZitiListener struct {
	Binding string `yaml:"binding"`
	Address string `yaml:"address"`
}

type ZitiResult

type ZitiResult struct {
	Data ZitiToken `json:"data"`
}

type ZitiRouterConfig

type ZitiRouterConfig struct {
	Version   int              `yaml:"v"`
	Identity  ZitiIdentity     `yaml:"identity"`
	Ctrl      ZitiCtrlEndpoint `yaml:"ctrl"`
	Dialers   []ZitiDialer     `yaml:"dialers"`
	Edge      ZitiEdgeCSR      `yaml:"edge"`
	Link      ZitiLinkConfig   `yaml:"link"`
	Listeners []ZitiListener   `yaml:"listeners"`
}

type ZitiSANs

type ZitiSANs struct {
	DNS []string `yaml:"dns"`
	IP  []string `yaml:"ip"`
}

type ZitiServiceConfig

type ZitiServiceConfig struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type ZitiServiceConfigsResult

type ZitiServiceConfigsResult struct {
	Data []ZitiServiceConfig `json:"data"`
}

type ZitiSigningCert

type ZitiSigningCert struct {
	Cert string `yaml:"cert"`
	Key  string `yaml:"key"`
}

type ZitiToken

type ZitiToken struct {
	Token string `json:"token"`
	ID    string `json:"id"`
}

type ZitiWebListener

type ZitiWebListener struct {
	Name       string           `yaml:"name"`
	BindPoints []ZitiBindPoint  `yaml:"bindPoints"`
	APIs       []ZitiAPIBinding `yaml:"apis"`
}

Jump to

Keyboard shortcuts

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