api

package
v0.27.5 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 24 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEntitiesOfType

func DeleteEntitiesOfType(api util.API, o *Options, entityType string, ids []string, body string) error

func DeleteEntityOfTypeWhere

func DeleteEntityOfTypeWhere(api util.API, options *Options, entityType string, body string) error

DeleteEntityOfTypeWhere implements the commands to delete various entity types

func GetJsonString

func GetJsonString(container *gabs.Container, path string) string

func GetJsonValue

func GetJsonValue(container *gabs.Container, path string) interface{}

func GetPlural

func GetPlural(entityType string) string

func MapNameToID

func MapNameToID(api util.API, entityType string, o *Options, idOrName string) (string, error)

func MapNamesToIDs

func MapNamesToIDs(api util.API, entityType string, o *Options, list ...string) ([]string, error)

func NewWsMgmtChannel

func NewWsMgmtChannel(bindHandler channel.BindHandler) (channel.Channel, error)

func RenderTable

func RenderTable(o *Options, t table.Writer, pagingInfo *Paging)

func SetJSONValue

func SetJSONValue(container *gabs.Container, value interface{}, path ...string)

func SetTags added in v0.27.2

func SetTags(container *gabs.Container, tags map[string]string, tagsJson string, path ...string)

Types

type EntityOptions added in v0.27.2

type EntityOptions struct {
	Options
	Tags     map[string]string
	TagsJson string
}

func NewEntityOptions added in v0.27.2

func NewEntityOptions(out, errOut io.Writer) EntityOptions

func (*EntityOptions) AddCommonFlags added in v0.27.2

func (self *EntityOptions) AddCommonFlags(cmd *cobra.Command)

func (*EntityOptions) GetTags added in v0.27.2

func (self *EntityOptions) GetTags() map[string]interface{}

func (*EntityOptions) SetTags added in v0.27.2

func (self *EntityOptions) SetTags(container *gabs.Container)

func (*EntityOptions) TagsProvided added in v0.27.2

func (self *EntityOptions) TagsProvided() bool

type Gabs2Wrapper

type Gabs2Wrapper struct {
	*gabs2.Container
}

func Wrap2

func Wrap2(c *gabs2.Container) *Gabs2Wrapper

func (*Gabs2Wrapper) Bool

func (self *Gabs2Wrapper) Bool(path string) bool

func (*Gabs2Wrapper) Float64

func (self *Gabs2Wrapper) Float64(path string) float64

func (*Gabs2Wrapper) String

func (self *Gabs2Wrapper) String(path string) string

func (*Gabs2Wrapper) StringSlice

func (self *Gabs2Wrapper) StringSlice(path string) []string

type GabsWrapper

type GabsWrapper struct {
	*gabs.Container
}

func Wrap

func Wrap(c *gabs.Container) *GabsWrapper

func (*GabsWrapper) Bool

func (self *GabsWrapper) Bool(path string) bool

func (*GabsWrapper) Float64

func (self *GabsWrapper) Float64(path string) float64

func (*GabsWrapper) String

func (self *GabsWrapper) String(path string) string

func (*GabsWrapper) StringSlice

func (self *GabsWrapper) StringSlice(path string) []string

type Options

type Options struct {
	common.CommonOptions
	OutputJSONRequest  bool
	OutputJSONResponse bool
	OutputCSV          bool
}

Options are common options for edge controller commands

func (*Options) AddCommonFlags

func (options *Options) AddCommonFlags(cmd *cobra.Command)

func (*Options) ErrOutputWriter

func (options *Options) ErrOutputWriter() io.Writer

func (*Options) LogCreateResult

func (options *Options) LogCreateResult(entityType string, result *gabs.Container, err error) error

func (*Options) OutputRequestJson

func (options *Options) OutputRequestJson() bool

func (*Options) OutputResponseJson

func (options *Options) OutputResponseJson() bool

func (*Options) OutputWriter

func (options *Options) OutputWriter() io.Writer

type Paging

type Paging struct {
	Limit  int64
	Offset int64
	Count  int64
	errorz.ErrorHolderImpl
}

func FilterEntitiesOfType

func FilterEntitiesOfType(api util.API, entityType string, filter string, logJSON bool, out io.Writer, timeout int, verbose bool) ([]*gabs.Container, *Paging, error)

func GetPaging

func GetPaging(c *gabs.Container) *Paging

func ListEntitiesOfType

func ListEntitiesOfType(api util.API, entityType string, params url.Values, logJSON bool, out io.Writer, timeout int, verbose bool) ([]*gabs.Container, *Paging, error)

ListEntitiesOfType queries the Ziti Controller for entities of the given type

func ListEntitiesWithOptions

func ListEntitiesWithOptions(api util.API, entityType string, options *Options) ([]*gabs.Container, *Paging, error)

ListEntitiesOfType queries the Ziti Controller for entities of the given type

func (*Paging) Output

func (p *Paging) Output(o *Options)

Jump to

Keyboard shortcuts

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