base

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2016 License: Apache-2.0 Imports: 2 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	URL                = "https://api.ctl.io"
	CTL_URL            = "http://www.ctl.io"
	PROJ_URL           = "https://github.com/CenturyLinkCloud/clc-go-cli"
	TIME_FORMAT        = "2006-01-02 15:04:05"
	SERVER_TIME_FORMAT = "2006-01-02T15:04:05Z"
	TIME_FORMAT_REPR   = "YYYY-MM-DD hh:mm:ss"
	DATE_FORMAT        = "2006-01-02"
)
View Source
var BuildDate = "No build date supplied"
View Source
var BuildGitCommit = "No git commit provided"
View Source
var BuildVersion = "built-from-source"

Functions

This section is empty.

Types

type AdjustableModel

type AdjustableModel interface {
	ApplyDefaultBehaviour() error
}

type BinaryResponse

type BinaryResponse string

type Command

type Command interface {
	Execute(cn Connection) error
	Resource() string
	Command() string
	Arguments() []string
	ShowBrief() []string
	ShowHelp() string
	InputModel() interface{}
	OutputModel() interface{}
	IsOffline() bool
	ExecuteOffline() (string, error)
}

type Connection

type Connection interface {
	ExecuteRequest(verb string, url string, reqModel interface{}, resModel interface{}) (err error)
	GetAccountAlias() string
}

type Formatter

type Formatter interface {
	FormatOutput(model interface{}) (string, error)
}

type IDInferable

type IDInferable interface {
	// After InferID has been completed, all the IDs possible have to have
	// been infered from names.
	InferID(cn Connection) error
	// GetNames exists for the purpose of getting the list of names of entities.
	// The property argument is a field that points to an entity name.
	GetNames(cn Connection, property string) ([]string, error)
}

IDInferable represents models that have IDs that can be infered from names through communicating the server.

type NilField

type NilField struct {
	Set bool
}

type Time

type Time string

func (*Time) MarshalJSON

func (t *Time) MarshalJSON() ([]byte, error)

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

type ValidatableModel

type ValidatableModel interface {
	Validate() error
}

Jump to

Keyboard shortcuts

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