cmd

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApiClient added in v0.1.3

func NewApiClient(host string, skipTLSVerify bool) (*api.APIClient, error)

func NewApiContext added in v0.1.3

func NewApiContext(token string) context.Context

func NewRootCmd added in v0.0.3

func NewRootCmd() (*cobra.Command, error)

func Run

func Run() error

Types

type ClientConfigV0dot1 added in v0.3.0

type ClientConfigV0dot1 struct {
	Version       string `json:"version"` // always blank in v0.1
	Name          string `json:"name"`
	Host          string `json:"host"`
	Token         string `json:"token"`
	SkipTLSVerify bool   `json:"skip-tls-verify"`
	SourceID      string `json:"source-id"`
}

func (ClientConfigV0dot1) ToV0dot2 added in v0.3.0

func (c ClientConfigV0dot1) ToV0dot2() *ClientConfigV0dot2

ToV0dot2 upgrades the config to the 1.0 version

type ClientConfigV0dot2 added in v0.3.0

type ClientConfigV0dot2 struct {
	Version    string                 `json:"version"` // always 0.2 in v0.2
	Registries []ClientRegistryConfig `json:"registries"`
}

func NewClientConfig added in v0.3.0

func NewClientConfig() *ClientConfigV0dot2

type ClientRegistryConfig added in v0.3.0

type ClientRegistryConfig struct {
	Name          string `json:"name"`
	Host          string `json:"host"`
	Token         string `json:"token"`
	SkipTLSVerify bool   `json:"skip-tls-verify"` // where is the other cert info stored?
	SourceID      string `json:"source-id"`
	Current       bool   `json:"current"`
}

type CodeResponse

type CodeResponse struct {
	Code  string
	State string
	Error error
}

type ErrUnauthenticated added in v0.0.15

type ErrUnauthenticated struct{}

func (*ErrUnauthenticated) Error added in v0.0.15

func (e *ErrUnauthenticated) Error() string

type LocalServer

type LocalServer struct {
	ResultChan chan CodeResponse
	// contains filtered or unexported fields
}

type VersionOptions added in v0.3.0

type VersionOptions struct {
	Client   bool
	Registry bool
}

Jump to

Keyboard shortcuts

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