emcoctl

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: CC0-1.0 Imports: 27 Imported by: 0

README

emco-client

EMCO Client Go Wrapper

Documentation

Index

Constants

View Source
const (
	FlagDelete string = "delete"
	FlagApply  string = "apply"
)

Variables

This section is empty.

Functions

func CleanUp

func CleanUp(filePath string) error

func ExecWithError

func ExecWithError() error

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GetCaCertUrl

func GetCaCertUrl() string

GetCaCertUrl construct the baseUrl for CaCert controller

func GetClmURL

func GetClmURL() string

GetClmURL Url for Clm

func GetDcmGrpcEndpoint

func GetDcmGrpcEndpoint() string

GetDcmGrpcEndpoint gRPC endpoint for dcm

func GetDcmURL

func GetDcmURL() string

GetDcmURL Url for Dcm

func GetDtcURL

func GetDtcURL() string

GetDtcURL Url for Dtc

func GetGacURL

func GetGacURL() string

GetGacURL Url for gac

func GetHpaPlacementURL

func GetHpaPlacementURL() string

GetHpaPlacementURL Url for Hpa Placement controller

func GetIngressURL

func GetIngressURL() string

GetIngressURL Url for Ingress

func GetNcmGrpcEndpoint

func GetNcmGrpcEndpoint() string

GetNcmGrpcEndpoint gRPC endpoint for ncm

func GetNcmURL

func GetNcmURL() string

GetNcmURL Url for Ncm

func GetOrchestratorGrpcEndpoint

func GetOrchestratorGrpcEndpoint() string

GetOrchestratorGrpcEndpoint gRPC endpoint for Orchestrator

func GetOrchestratorURL

func GetOrchestratorURL() string

GetOrchestratorURL Url for Orchestrator

func GetOvnactionURL

func GetOvnactionURL() string

GetOvnactionURL Url for Ovnaction

func GetPolicyURL

func GetPolicyURL() string

GetPolicyUrl construct the baseUrl for policy controller

func GetResponseOutput

func GetResponseOutput() resty.Response

Get ouput of output func

func GetSfcClientURL

func GetSfcClientURL() string

GetSfcClientURL Url for sfcclient

func GetSfcURL

func GetSfcURL() string

GetSfcURL Url for sfc

func GetTacURL

func GetTacURL() string

get the URL for the temporal action controller

func GetURL

func GetURL(anchor string) (string, error)

GetURL reads the configuration file to get URL

func GetWorkflowMgrURL

func GetWorkflowMgrURL() string

func HandleError

func HandleError(err error, op string, anchor string) bool

func InterpolateValueFile

func InterpolateValueFile(templateString *string, values map[string]string) (string, error)

func SaveValueFile

func SaveValueFile(fileName string, folder string, valueString *string) (string, error)

func SetArgs

func SetArgs(args []string)

SetArg for root command

func SetConfigFilePath

func SetConfigFilePath(path string)

Set Config File Path

func SetDebugFlags

func SetDebugFlags()

func SetDefaultConfiguration

func SetDefaultConfiguration()

SetDefaultConfiguration default configuration if t

func WatchGrpcEndpoint

func WatchGrpcEndpoint(args ...string)

WatchGrpcEndpoint reads the configuration file to get gRPC Endpoint and makes a connection to watch status notifications.

Types

type ControllerConfigurations

type ControllerConfigurations struct {
	Port       int
	StatusPort int
	Host       string
}

ControllerConfigurations exported

type GrpcClient

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

GrpcClient to use with CLI

type Metadata

type Metadata struct {
	Name        string `yaml:"name" json:"name"`
	Description string `yaml:"description,omitempty" json:"description,omitempty"`
	UserData1   string `yaml:"userData1,omitempty" json:"userData1,omitempty"`
	UserData2   string `yaml:"userData2,omitempty" json:"userData2,omitempty"`
}

type ResourceContext

type ResourceContext struct {
	Anchor string `json:"anchor" yaml:"anchor"`
}

type Resources

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

type RestyClient

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

RestyClient to use with CLI

var Client RestyClient

func NewRestClient

func NewRestClient() RestyClient

NewRestClient returns a rest client

func NewRestClientToken

func NewRestClientToken(token string) RestyClient

NewRestClientToken returns a rest client with token

func (RestyClient) RestClientApply

func (r RestyClient) RestClientApply(anchor string, body []byte, put bool) (*resty.Response, error)

RestClientApply to post to server no multipart

func (RestyClient) RestClientDelete

func (r RestyClient) RestClientDelete(anchor string, body []byte) (*resty.Response, error)

RestClientDelete calls rest delete command

func (RestyClient) RestClientDeleteAnchor

func (r RestyClient) RestClientDeleteAnchor(anchor string) (*resty.Response, error)

RestClientDeleteAnchor returns all resource in the input file

func (RestyClient) RestClientGet

func (r RestyClient) RestClientGet(anchor string, body []byte) error

RestClientGet gets resource

func (RestyClient) RestClientGetAnchor

func (r RestyClient) RestClientGetAnchor(anchor string) error

RestClientGetAnchor returns get data from anchor

func (RestyClient) RestClientMultipartApply

func (r RestyClient) RestClientMultipartApply(anchor string, body []byte, file string, put bool) error

RestClientMultipartApply to post to server with multipart

func (RestyClient) RestClientMultipartApplyMultipleFiles

func (r RestyClient) RestClientMultipartApplyMultipleFiles(anchor string, body []byte, files []string, put bool) (*resty.Response, error)

RestClientMultipartApplyMultipleFiles to post to server with multipart

func (RestyClient) RestClientMultipartPost

func (r RestyClient) RestClientMultipartPost(anchor string, body []byte, file string) error

RestClientMultipartPost to post to server with multipart

func (RestyClient) RestClientMultipartPostMultipleFiles

func (r RestyClient) RestClientMultipartPostMultipleFiles(anchor string, body []byte, files []string) (*resty.Response, error)

RestClientMultipartPostMultipleFiles to post to server with multipart

func (RestyClient) RestClientMultipartPut

func (r RestyClient) RestClientMultipartPut(anchor string, body []byte, file string) error

RestClientMultipartPut to post to server with multipart

func (RestyClient) RestClientMultipartPutMultipleFiles

func (r RestyClient) RestClientMultipartPutMultipleFiles(anchor string, body []byte, files []string) (*resty.Response, error)

RestClientMultipartPutMultipleFiles to post to server with multipart

func (RestyClient) RestClientPost

func (r RestyClient) RestClientPost(anchor string, body []byte) (*resty.Response, error)

RestClientPost to post to server no multipart

func (RestyClient) RestClientPut

func (r RestyClient) RestClientPut(anchor string, body []byte) (*resty.Response, error)

RestClientPut to post to server no multipart

Jump to

Keyboard shortcuts

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