Documentation ¶
Index ¶
- Constants
- Variables
- func AllowInsecureSSLConnection()
- func CreateKeyValuePairs(mapData map[string]string) string
- func EnableVerboseMode()
- func GetCmdFlags(cmd string) string
- func GetCmdUsage(program, cmd, subcmd, arg string) string
- func GetCmdUsageForNonArguments(program, cmd, subcmd string) string
- func GetFileContent(filePath string) string
- func GetRESTAPIBase() string
- func GetRemoteConfigFilePath() string
- func GetTableWriter() *tablewriter.Table
- func GetUrlAndParams(urlPrefix, key, value string) (string, map[string]string)
- func HandleErrorAndExit(msg string, err error)
- func InitRemoteConfigData()
- func InvokeDELETERequest(url string, headers map[string]string) (*resty.Response, error)
- func InvokeGETRequest(url string, headers map[string]string, params map[string]string) (*resty.Response, error)
- func InvokePOSTRequest(url string, headers map[string]string, body string) (*resty.Response, error)
- func InvokeUPDATERequest(url string, headers map[string]string, body map[string]string) (*resty.Response, error)
- func IsFileExist(path string) bool
- func Logf(format string, a ...interface{})
- func Logln(a ...interface{})
- func PrintItemList(itemList IterableStringArray, columnData []string, emptyWarning string)
- func PrintList(list []string)
- func PromptForPassword() string
- func PromptForUsername() string
- func PutQueryParamsToMap(paramMap map[string]string, key string, value string) map[string]string
- func UnmarshalData(url string, headers map[string]string, params map[string]string, ...) (interface{}, error)
- func UnmarshalJsonToStringMap(body []byte) map[string]string
- func UpdateMILogger(loggerName, loggingLevel string) string
- func WhereAmI(depthList ...int) string
- type IterableStringArray
- type Logger
- type LoginResponse
- type LogoutResponse
- type Remote
- type RemoteConfig
- func (remoteConfig *RemoteConfig) AddRemote(name string, host string, port string) error
- func (remoteConfig *RemoteConfig) Load(filePath string)
- func (remoteConfig *RemoteConfig) Persist(filePath string)
- func (remoteConfig *RemoteConfig) RemoveRemote(name string) error
- func (remoteConfig *RemoteConfig) Reset()
- func (remoteConfig *RemoteConfig) SelectRemote(name string) error
- func (remoteConfig *RemoteConfig) UpdateCurrentRemoteToken(accessToken string) error
- func (remoteConfig *RemoteConfig) UpdateRemote(name string, host string, port string) error
- type RemoteInfo
- type RemoteSummary
- type Remotes
- type Service
Constants ¶
View Source
const ConfigDirName = ".wso2micli"
View Source
const Context = "management"
View Source
const Count = "COUNT"
View Source
const CronExpression = "CRON EXPRESSION"
View Source
const DefaultEnvironmentName = "default"
View Source
const DefaultHost = "localhost"
View Source
const DefaultHttpRequestTimeout = 100000
View Source
const DefaultPort = "9164"
View Source
const DefaultRESTAPIBase = HTTPSProtocol + DefaultHost + ":" + DefaultPort + "/" + Context + "/"
View Source
const DefaultRemoteName = "default"
View Source
const DefaultTokenValidityPeriod = "3600"
Other
View Source
const Description = "DESCRIPTION"
View Source
const HTTPProtocol = "http://"
DO NOT CHANGE THESE MANUALLY Default Server Address
View Source
const HTTPSProtocol = "https://"
View Source
const HeaderAccept = "Accept"
View Source
const HeaderAuthorization = "Authorization"
Headers and Header Values
View Source
const HeaderConnection = "Connection"
View Source
const HeaderConsumes = "Consumes"
View Source
const HeaderContentEncoding = "Content-Encoding"
View Source
const HeaderContentType = "Content-Type"
View Source
const HeaderProduces = "Produces"
View Source
const HeaderTransferEncoding = "transfer-encoding"
View Source
const HeaderValueApplicationJSON = "application/json"
View Source
const HeaderValueApplicationZip = "application/zip"
View Source
const HeaderValueAuthPrefixBasic = "Basic"
View Source
const HeaderValueAuthPrefixBearer = "Bearer"
View Source
const HeaderValueChunked = "chunked"
View Source
const HeaderValueGZIP = "gzip"
View Source
const HeaderValueKeepAlive = "keep-alive"
View Source
const HeaderValueMultiPartFormData = "multipart/form-data"
View Source
const HeaderValueXWWWFormUrlEncoded = "application/x-www-form-urlencoded"
View Source
const HelpCommand = "help"
View Source
const Interval = "INTERVAL"
View Source
const LogPrefixError = "[ERROR] "
View Source
const LogPrefixInfo = "[INFO] "
Logging Prefixes
View Source
const LogPrefixWarning = "[WARN] "
View Source
const LoginResource = "login"
View Source
const LogoutResource = "logout"
View Source
const Method = "METHOD"
View Source
const Name = "NAME"
View Source
const Package = "PACKAGE"
View Source
const PrefixAPIs = "apis"
View Source
const PrefixCarbonApps = "applications"
View Source
const PrefixConnectors = "connectors"
View Source
const PrefixDataServices = "data-services"
View Source
const PrefixEndpoints = "endpoints"
View Source
const PrefixInboundEndpoints = "inbound-endpoints"
View Source
const PrefixLocalEntries = "local-entries"
View Source
const PrefixLogging = "logging"
View Source
const PrefixMessageProcessors = "message-processors"
View Source
const PrefixMessageStores = "message-stores"
View Source
const PrefixProxyServices = "proxy-services"
View Source
const PrefixSequences = "sequences"
View Source
const PrefixServer = "server"
View Source
const PrefixServices = "services"
View Source
const PrefixTasks = "tasks"
View Source
const PrefixTemplates = "templates"
View Source
const ProjectName = "mi"
View Source
const RemoteConfigFileName = "mi_cli_remote_config.yaml"
View Source
const SampleMainConfigFileName = "main_config.yaml.sample"
View Source
const ServerResource = "server"
View Source
const ShowCommand = "show"
View Source
const Size = "SIZE"
View Source
const Stats = "STATS"
View Source
const Status = "STATUS"
View Source
const Tracing = "TRACING"
View Source
const TriggerType = "TRIGGER TYPE"
View Source
const Type = "TYPE"
View Source
const Url = "URL"
View Source
const Version = "VERSION"
View Source
const Wsdl11 = "WSDL 1.1"
View Source
const Wsdl20 = "WSDL 2.0"
Variables ¶
View Source
var ConfigDirPath = filepath.Join(HomeDirectory, ConfigDirName)
View Source
var HomeDirectory = os.Getenv("HOME")
View Source
var IsVerbose bool
View Source
var PathSeparator_ = string(os.PathSeparator)
Functions ¶
func AllowInsecureSSLConnection ¶
func AllowInsecureSSLConnection()
func CreateKeyValuePairs ¶
func EnableVerboseMode ¶
func EnableVerboseMode()
func GetCmdFlags ¶
func GetCmdUsage ¶
func GetFileContent ¶
func GetRESTAPIBase ¶
func GetRESTAPIBase() string
func GetRemoteConfigFilePath ¶
func GetRemoteConfigFilePath() string
func GetTableWriter ¶
func GetTableWriter() *tablewriter.Table
func GetUrlAndParams ¶
func HandleErrorAndExit ¶
func InitRemoteConfigData ¶
func InitRemoteConfigData()
func InvokeDELETERequest ¶
Invoke http-delete request using go-resty
func InvokeGETRequest ¶
func InvokeGETRequest(url string, headers map[string]string, params map[string]string) (*resty.Response, error)
Invoke http-get request using go-resty
func InvokePOSTRequest ¶
Invoke http-post request using go-resty
func InvokeUPDATERequest ¶
func InvokeUPDATERequest(url string, headers map[string]string, body map[string]string) (*resty.Response, error)
Invoke http-put request using go-resty
func PrintItemList ¶
func PrintItemList(itemList IterableStringArray, columnData []string, emptyWarning string)
func PromptForPassword ¶
func PromptForPassword() string
func PromptForUsername ¶
func PromptForUsername() string
func PutQueryParamsToMap ¶
func UnmarshalData ¶
func UnmarshalData(url string, headers map[string]string, params map[string]string, model interface{}) (interface{}, error)
Unmarshal Data from the response to the respective struct @param url: url of rest api @param headers: HTTP headers @param model: struct object @param params: parameters for the HTTP call @return struct object @return error
func UpdateMILogger ¶
Types ¶
type IterableStringArray ¶
type LoginResponse ¶
type LoginResponse struct {
AccessToken string `yaml:"AccessToken"`
}
type LogoutResponse ¶
type LogoutResponse struct { }
type RemoteConfig ¶
type RemoteConfig struct { Remotes Remotes `yaml:"remotes"` CurrentRemote string `yaml:"current_remote"` }
var RemoteConfigData RemoteConfig
func (*RemoteConfig) AddRemote ¶
func (remoteConfig *RemoteConfig) AddRemote(name string, host string, port string) error
func (*RemoteConfig) Load ¶
func (remoteConfig *RemoteConfig) Load(filePath string)
func (*RemoteConfig) Persist ¶
func (remoteConfig *RemoteConfig) Persist(filePath string)
func (*RemoteConfig) RemoveRemote ¶
func (remoteConfig *RemoteConfig) RemoveRemote(name string) error
func (*RemoteConfig) Reset ¶
func (remoteConfig *RemoteConfig) Reset()
func (*RemoteConfig) SelectRemote ¶
func (remoteConfig *RemoteConfig) SelectRemote(name string) error
func (*RemoteConfig) UpdateCurrentRemoteToken ¶
func (remoteConfig *RemoteConfig) UpdateCurrentRemoteToken(accessToken string) error
update the access token of the current remote
func (*RemoteConfig) UpdateRemote ¶
func (remoteConfig *RemoteConfig) UpdateRemote(name string, host string, port string) error
type RemoteInfo ¶
type RemoteSummary ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.