utils

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogVersion1 = "1.0.0"
	LogVersion2 = "2.0.0"
)

log versions

View Source
const (
	AccessToken = authType(0)
	Bearer      = authType(1)
)

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(data string) string

AesDecrypt decode base64 data with AES

func AppendMap

func AppendMap(base map[string]string, toadd map[string]string)

func GetRandomId

func GetRandomId() string

GetRandomId 生成随机33位uuid,并且,(首字母开头 + 32位uuid)构成Id

func JsonConvertObjToString

func JsonConvertObjToString(source interface{}) (string, error)

func JsonConvertObjToType

func JsonConvertObjToType(source interface{}, dest interface{}) error

Types

type ESClient

type ESClient struct {
	*elastic.Client
	URLs       string
	LogVersion string
	Indices    []string
}

ESClient .

func GetESClientsFromLogAnalytics

func GetESClientsFromLogAnalytics(logDeployment *db.LogDeployment, addon string) *ESClient

func (*ESClient) CreateIndexTemplate added in v1.3.0

func (c *ESClient) CreateIndexTemplate(templateName string, indexPattern string, aliases ...string) error

func (*ESClient) CreateIndexWithAlias

func (c *ESClient) CreateIndexWithAlias(index string, aliases ...string) error

type NacosClient

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

func NewNacosClient

func NewNacosClient(clusterName, addr, user, password string) *NacosClient

func (*NacosClient) CreateNamespace

func (c *NacosClient) CreateNamespace(namespaceName string) (string, error)

func (*NacosClient) DeleteConfig

func (c *NacosClient) DeleteConfig(tenantName string, groupName string) error

func (*NacosClient) GetNamespaceId

func (c *NacosClient) GetNamespaceId(namespaceName string) (string, error)

func (*NacosClient) Login

func (c *NacosClient) Login() (string, error)

func (*NacosClient) SaveConfig

func (c *NacosClient) SaveConfig(tenantName string, groupName string, dataId string, content string) error

Jump to

Keyboard shortcuts

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