tls

package
v1.0.107 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 25 Imported by: 3

Documentation

Index

Constants

View Source
const (
	RequestIDHeader  = "x-tls-requestid"
	AgentHeader      = "User-Agent"
	ContentMd5Header = "Content-MD5"
	ServiceName      = "TLS"

	CompressLz4  = "lz4"
	CompressNone = "none"

	FullTextIndexKey = "__content__"

	PathCreateProject    = "/CreateProject"
	PathDescribeProject  = "/DescribeProject"
	PathDeleteProject    = "/DeleteProject"
	PathModifyProject    = "/ModifyProject"
	PathDescribeProjects = "/DescribeProjects"

	PathCreateTopic    = "/CreateTopic"
	PathDescribeTopic  = "/DescribeTopic"
	PathDeleteTopic    = "/DeleteTopic"
	PathModifyTopic    = "/ModifyTopic"
	PathDescribeTopics = "/DescribeTopics"

	PathCreateIndex   = "/CreateIndex"
	PathDescribeIndex = "/DescribeIndex"
	PathDeleteIndex   = "/DeleteIndex"
	PathModifyIndex   = "/ModifyIndex"
	PathSearchLogs    = "/SearchLogs"

	PathDescribeShards = "/DescribeShards"

	PathPutLogs            = "/PutLogs"
	PathDescribeCursor     = "/DescribeCursor"
	PathConsumeLogs        = "/ConsumeLogs"
	PathDescribeLogContext = "/DescribeLogContext"

	PathCreateRule               = "/CreateRule"
	PathDeleteRule               = "/DeleteRule"
	PathModifyRule               = "/ModifyRule"
	PathDescribeRule             = "/DescribeRule"
	PathDescribeRules            = "/DescribeRules"
	PathApplyRuleToHostGroups    = "/ApplyRuleToHostGroups"
	PathDeleteRuleFromHostGroups = "/DeleteRuleFromHostGroups"

	PathCreateHostGroup            = "/CreateHostGroup"
	PathDeleteHostGroup            = "/DeleteHostGroup"
	PathModifyHostGroup            = "/ModifyHostGroup"
	PathDescribeHostGroup          = "/DescribeHostGroup"
	PathDescribeHostGroups         = "/DescribeHostGroups"
	PathDescribeHostGroupRules     = "/DescribeHostGroupRules"
	PathModifyHostGroupsAutoUpdate = "/ModifyHostGroupsAutoUpdate"

	PathDeleteHost    = "/DeleteHost"
	PathDescribeHosts = "/DescribeHosts"

	PathCreateAlarmNotifyGroup    = "/CreateAlarmNotifyGroup"
	PathDeleteAlarmNotifyGroup    = "/DeleteAlarmNotifyGroup"
	PathDescribeAlarmNotifyGroups = "/DescribeAlarmNotifyGroups"
	PathModifyAlarmNotifyGroup    = "/ModifyAlarmNotifyGroup"
	PathCreateAlarm               = "/CreateAlarm"
	PathDeleteAlarm               = "/DeleteAlarm"
	PathModifyAlarm               = "/ModifyAlarm"
	PathDescribeAlarms            = "/DescribeAlarms"

	PathCreateDownloadTask    = "/CreateDownloadTask"
	PathDescribeDownloadTasks = "/DescribeDownloadTasks"
	PathDescribeDownloadUrl   = "/DescribeDownloadUrl"

	PathWebTracks = "/WebTracks"

	PathDescribeHistogram = "/DescribeHistogram"

	PathOpenKafkaConsumer     = "/OpenKafkaConsumer"
	PathCloseKafkaConsumer    = "/CloseKafkaConsumer"
	PathDescribeKafkaConsumer = "/DescribeKafkaConsumer"

	PathCreateConsumerGroup    = "/CreateConsumerGroup"
	PathDeleteConsumerGroup    = "/DeleteConsumerGroup"
	PathDescribeConsumerGroups = "/DescribeConsumerGroups"
	PathModifyConsumerGroup    = "/ModifyConsumerGroup"

	PathConsumerHeartbeat = "/ConsumerHeartbeat"

	PathDescribeCheckPoint = "/DescribeCheckPoint"
	PathModifyCheckPoint   = "/ModifyCheckPoint"

	HeaderAPIVersion = "x-tls-apiversion"
	APIVersion2      = "0.2.0"
	APIVersion3      = "0.3.0"
)
View Source
const (
	// ErrProjectNotExists 日志项目(Project)不存在
	ErrProjectNotExists = "ProjectNotExists"

	// ErrTopicNotExists 指定日志主题不存在
	ErrTopicNotExists = "TopicNotExist"

	// ErrIndexNotExists 指定索引不存在
	ErrIndexNotExists = "IndexNotExists"

	// ErrInvalidParam 请求参数不合法
	ErrInvalidParam = "InvalidArgument"

	// ErrDeserializeFailed 日志反序列化失败
	ErrDeserializeFailed = "DeserializeFailed"

	// ErrInternalServerError 日志服务内部错误
	ErrInternalServerError = "InternalError"

	// ErrProjectAlreadyExists 创建日志项目重复
	ErrProjectAlreadyExists = "ProjectAlreadyExist"

	// ErrTopicAlreadyExist 创建日志主题重复
	ErrTopicAlreadyExist = "TopicAlreadyExist"

	// ErrIndexAlreadyExists 创建日志索引重复
	ErrIndexAlreadyExists = "IndexAlreadyExist"

	// ErrIndexConflict 制定索引状态错误
	ErrIndexConflict = "IndexStateConflict"

	// ErrSearchOutOfRange 日志搜索时指定时间范围越界
	ErrSearchOutOfRange = "SearchOutOfRange"

	// ErrSqlSyntaxError SQL语句语法错误
	ErrSqlSyntaxError = "SqlSyntaxError"

	// ErrSearchSyntaxError 搜索语句语法错误
	ErrSearchSyntaxError = "SearchSyntaxError"

	// ErrSqlResultError SQL检索结果错误
	ErrSqlResultError = "SqlResultError"

	// ProjectQuotaExceed 日志项目配额不足
	ProjectQuotaExceed = "ProjectQuotaExceed"

	// ProjectDeletedHasTopic 删除指定日志项目时,该日志项目仍有topic未被删除
	ProjectDeletedHasTopic = "ProjectDeletedHasTopic"

	// ErrInvalidAccessKeyId AccessKeyID不合法
	ErrInvalidAccessKeyId = "InvalidAccessKeyId"

	// ErrInvalidSecurityToken 授权令牌不合法
	ErrInvalidSecurityToken = "InvalidSecurityToken"

	// ErrAuthorizationQueryParameters 鉴权参数不合法
	ErrAuthorizationQueryParameters = "AuthorizationQueryParametersError"

	// ErrRequestHasExpired 请求超时
	ErrRequestHasExpired = "RequestExpired"

	// ErrSignatureDoesNotMatch 签名不匹配
	ErrSignatureDoesNotMatch = "SignatureDoesNotMatch"

	// ErrRequestTimeTooSkewed 客户端与服务端时间差距太大
	ErrRequestTimeTooSkewed = "RequestTimeTooSkewed"

	// ErrAuthFailed 鉴权失败
	ErrAuthFailed = "AuthFailed"

	// ErrLogMD5CheckFailed 上传日志md5校验失败
	ErrLogMD5CheckFailed = "ErrLogMD5CheckFailed"

	// ErrAccessDenied 提供的AccessKeyID与指定的资源不匹配
	ErrAccessDenied = "AccessDenied"

	// ErrNotSupport 请求方法不支持
	ErrNotSupport = "MethodNotSupport"

	// ErrExceededMaxLogCount 上传日志中Log数量过大
	ErrExceededMaxLogCount = "TooManyLogs"

	// ErrExceededMaxLogSize 上传日志中Log容量太大
	ErrExceededMaxLogSize = "LogSizeTooLarge"

	// ErrExceededMaxLogGroupListSize 上传日志的LogGroupList容量太大
	ErrExceededMaxLogGroupListSize = "LogGroupListSizeTooLarge"

	// ErrExceedQPSLimit QPS过高
	ErrExceedQPSLimit = "ExceedQPSLimit"

	// ErrIndexTypeParam 索引类型不合法
	ErrIndexTypeParam = "InvalidIndexArgument"

	// IndexKeyValueQuotaExceed 索引KeyValue配额不足
	IndexKeyValueQuotaExceed = "IndexKeyValueQuotaExceed"

	// ErrValueTypeConflictAttr 索引类型冲突
	ErrValueTypeConflictAttr = "ValueTypeConflict"

	// ErrSQLFlagConflictAttr SQL Flag冲突
	ErrSQLFlagConflictAttr = "SQLFlagConflict"

	// ErrDelimiterChineseConflict 分隔符与中文配置冲突
	ErrDelimiterChineseConflict = "DelimiterChineseConflict"

	// ErrIndexKeyDuplicate 索引关键字重复
	ErrIndexKeyDuplicate = "IndexKeyDuplicate"

	// ErrIndexKeyValueNULL 索引关键字为空
	ErrIndexKeyValueNULL = "IndexKVNULL"

	// ErrConsumerGroupAlreadyExists 消费者组已存在
	ErrConsumerGroupAlreadyExists = "ConsumerGroupAlreadyExists"

	// ErrConsumerHeartbeatExpired ConsumerGroup心跳过期
	ErrConsumerHeartbeatExpired = "ConsumerHeartbeatExpired"
)

Variables

This section is empty.

Functions

func CopyIncompressible

func CopyIncompressible(src, dst []byte) (int, error)

func GetCallerFuncName

func GetCallerFuncName(step int) string

func GetLogsFromMap

func GetLogsFromMap(logTime int64, logMap map[string]string) *pb.Log

func GetPutLogsBody

func GetPutLogsBody(compressType string, logGroupList *pb.LogGroupList) ([]byte, int, error)

func GetWebTracksBody

func GetWebTracksBody(compressType string, request *WebTracksRequest) ([]byte, int, error)

func ReplaceWhiteSpaceCharacter added in v1.0.102

func ReplaceWhiteSpaceCharacter(str string) string

func RetryWithCondition

func RetryWithCondition(ctx context.Context, o ConditionOperation) error

Types

type AnalysisResult

type AnalysisResult struct {
	Schema []string                 `json:"Schema"`
	Type   map[string]string        `json:"Type"`
	Data   []map[string]interface{} `json:"Data"`
}

type ApplyRuleToHostGroupsRequest

type ApplyRuleToHostGroupsRequest struct {
	CommonRequest
	RuleID       string   `json:"RuleId"`
	HostGroupIDs []string `json:"HostGroupIds"`
}

func (*ApplyRuleToHostGroupsRequest) CheckValidation

func (v *ApplyRuleToHostGroupsRequest) CheckValidation() error

type BadResponseError

type BadResponseError struct {
	RespBody   string
	RespHeader map[string][]string
	HTTPCode   int
}

func NewBadResponseError

func NewBadResponseError(body string, header map[string][]string, httpCode int) *BadResponseError

func (BadResponseError) Error

func (e BadResponseError) Error() string

func (BadResponseError) String

func (e BadResponseError) String() string

type Client

type Client interface {
	ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)
	SetTimeout(timeout time.Duration)
	SetAPIVersion(version string)

	PutLogs(request *PutLogsRequest) (response *CommonResponse, err error)
	PutLogsV2(request *PutLogsV2Request) (response *CommonResponse, err error)
	DescribeCursor(request *DescribeCursorRequest) (*DescribeCursorResponse, error)
	ConsumeLogs(request *ConsumeLogsRequest) (*ConsumeLogsResponse, error)
	DescribeLogContext(request *DescribeLogContextRequest) (*DescribeLogContextResponse, error)

	CreateProject(request *CreateProjectRequest) (*CreateProjectResponse, error)
	DeleteProject(request *DeleteProjectRequest) (*CommonResponse, error)
	DescribeProject(request *DescribeProjectRequest) (*DescribeProjectResponse, error)
	DescribeProjects(request *DescribeProjectsRequest) (*DescribeProjectsResponse, error)
	ModifyProject(request *ModifyProjectRequest) (*CommonResponse, error)

	CreateTopic(request *CreateTopicRequest) (*CreateTopicResponse, error)
	DeleteTopic(request *DeleteTopicRequest) (*CommonResponse, error)
	DescribeTopic(request *DescribeTopicRequest) (*DescribeTopicResponse, error)
	DescribeTopics(request *DescribeTopicsRequest) (*DescribeTopicsResponse, error)
	ModifyTopic(request *ModifyTopicRequest) (*CommonResponse, error)

	CreateIndex(request *CreateIndexRequest) (*CreateIndexResponse, error)
	DeleteIndex(request *DeleteIndexRequest) (*CommonResponse, error)
	DescribeIndex(request *DescribeIndexRequest) (*DescribeIndexResponse, error)
	ModifyIndex(request *ModifyIndexRequest) (*CommonResponse, error)
	SearchLogs(request *SearchLogsRequest) (*SearchLogsResponse, error)
	SearchLogsV2(request *SearchLogsRequest) (*SearchLogsResponse, error)

	DescribeShards(request *DescribeShardsRequest) (*DescribeShardsResponse, error)

	CreateRule(request *CreateRuleRequest) (*CreateRuleResponse, error)
	DeleteRule(request *DeleteRuleRequest) (*CommonResponse, error)
	ModifyRule(request *ModifyRuleRequest) (*CommonResponse, error)
	DescribeRule(request *DescribeRuleRequest) (*DescribeRuleResponse, error)
	DescribeRules(request *DescribeRulesRequest) (*DescribeRulesResponse, error)
	ApplyRuleToHostGroups(request *ApplyRuleToHostGroupsRequest) (*CommonResponse, error)
	DeleteRuleFromHostGroups(request *DeleteRuleFromHostGroupsRequest) (*CommonResponse, error)

	CreateHostGroup(request *CreateHostGroupRequest) (*CreateHostGroupResponse, error)
	DeleteHostGroup(request *DeleteHostGroupRequest) (*CommonResponse, error)
	ModifyHostGroup(request *ModifyHostGroupRequest) (*CommonResponse, error)
	DescribeHostGroup(request *DescribeHostGroupRequest) (*DescribeHostGroupResponse, error)
	DescribeHostGroups(request *DescribeHostGroupsRequest) (*DescribeHostGroupsResponse, error)
	DescribeHosts(request *DescribeHostsRequest) (*DescribeHostsResponse, error)
	DeleteHost(request *DeleteHostRequest) (*CommonResponse, error)
	DescribeHostGroupRules(request *DescribeHostGroupRulesRequest) (*DescribeHostGroupRulesResponse, error)
	ModifyHostGroupsAutoUpdate(request *ModifyHostGroupsAutoUpdateRequest) (*ModifyHostGroupsAutoUpdateResponse, error)

	CreateAlarm(request *CreateAlarmRequest) (*CreateAlarmResponse, error)
	DeleteAlarm(request *DeleteAlarmRequest) (*CommonResponse, error)
	ModifyAlarm(request *ModifyAlarmRequest) (*CommonResponse, error)
	DescribeAlarms(request *DescribeAlarmsRequest) (*DescribeAlarmsResponse, error)
	CreateAlarmNotifyGroup(request *CreateAlarmNotifyGroupRequest) (*CreateAlarmNotifyGroupResponse, error)
	DeleteAlarmNotifyGroup(request *DeleteAlarmNotifyGroupRequest) (*CommonResponse, error)
	ModifyAlarmNotifyGroup(request *ModifyAlarmNotifyGroupRequest) (*CommonResponse, error)
	DescribeAlarmNotifyGroups(request *DescribeAlarmNotifyGroupsRequest) (*DescribeAlarmNotifyGroupsResponse, error)

	CreateDownloadTask(request *CreateDownloadTaskRequest) (*CreateDownloadTaskResponse, error)
	DescribeDownloadTasks(request *DescribeDownloadTasksRequest) (*DescribeDownloadTasksResponse, error)
	DescribeDownloadUrl(request *DescribeDownloadUrlRequest) (*DescribeDownloadUrlResponse, error)

	WebTracks(request *WebTracksRequest) (*WebTracksResponse, error)

	OpenKafkaConsumer(request *OpenKafkaConsumerRequest) (*OpenKafkaConsumerResponse, error)
	CloseKafkaConsumer(request *CloseKafkaConsumerRequest) (*CloseKafkaConsumerResponse, error)
	DescribeKafkaConsumer(request *DescribeKafkaConsumerRequest) (*DescribeKafkaConsumerResponse, error)

	DescribeHistogram(request *DescribeHistogramRequest) (*DescribeHistogramResponse, error)

	CreateConsumerGroup(request *CreateConsumerGroupRequest) (*CreateConsumerGroupResponse, error)
	DeleteConsumerGroup(request *DeleteConsumerGroupRequest) (*CommonResponse, error)
	DescribeConsumerGroups(request *DescribeConsumerGroupsRequest) (*DescribeConsumerGroupsResponse, error)
	ModifyConsumerGroup(request *ModifyConsumerGroupRequest) (*CommonResponse, error)

	ConsumerHeartbeat(request *ConsumerHeartbeatRequest) (*ConsumerHeartbeatResponse, error)
	DescribeCheckPoint(request *DescribeCheckPointRequest) (*DescribeCheckPointResponse, error)
	ModifyCheckPoint(request *ModifyCheckPointRequest) (*CommonResponse, error)
}

func NewClient

func NewClient(endpoint, accessKeyID, accessKeySecret, securityToken, region string) Client

type CloseKafkaConsumerRequest

type CloseKafkaConsumerRequest struct {
	CommonRequest
	TopicID string `json:"TopicId"`
}

func (*CloseKafkaConsumerRequest) CheckValidation

func (v *CloseKafkaConsumerRequest) CheckValidation() error

type CloseKafkaConsumerResponse

type CloseKafkaConsumerResponse struct {
	CommonResponse
}

type CommonRequest

type CommonRequest struct {
	Headers map[string]string `json:"-"`
}

type CommonResponse

type CommonResponse struct {
	RequestID string `json:"RequestId"`
}

func (*CommonResponse) FillRequestId

func (response *CommonResponse) FillRequestId(httpResponse *http.Response)

type ConditionOperation

type ConditionOperation func() error

type ConsumeLogsRequest

type ConsumeLogsRequest struct {
	CommonRequest
	TopicID       string
	ShardID       int
	Cursor        string
	EndCursor     *string `json:",omitempty"`
	LogGroupCount *int    `json:",omitempty"`
	Compression   *string `json:",omitempty"`

	ConsumerGroupName *string `json:",omitempty"`
	ConsumerName      *string `json:",omitempty"`
}

func (*ConsumeLogsRequest) CheckValidation

func (v *ConsumeLogsRequest) CheckValidation() error

type ConsumeLogsResponse

type ConsumeLogsResponse struct {
	CommonResponse
	Cursor string //X-Tls-Cursor
	Count  int    //X-Tls-Count
	Logs   *pb.LogGroupList
}

type ConsumeShard

type ConsumeShard struct {
	TopicID string `yaml:"TopicID"`
	ShardID int    `yaml:"ShardID"`
}

type ConsumerGroupResp

type ConsumerGroupResp struct {
	ProjectID         string `json:"ProjectID"`
	ConsumerGroupName string `json:"ConsumerGroupName"`
	HeartbeatTTL      int    `json:"HeartbeatTTL"`
	OrderedConsume    bool   `json:"OrderedConsume"`
}

type ConsumerHeartbeatRequest

type ConsumerHeartbeatRequest struct {
	ProjectID         string `json:"ProjectID"`
	ConsumerGroupName string `json:"ConsumerGroupName"`
	ConsumerName      string `json:"ConsumerName"`
}

type ConsumerHeartbeatResponse

type ConsumerHeartbeatResponse struct {
	CommonResponse
	Shards []*ConsumeShard `json:"Shards"`
}

type ContainerRule

type ContainerRule struct {
	Stream                     string            `json:"Stream,omitempty"`
	ContainerNameRegex         string            `json:"ContainerNameRegex,omitempty"`
	IncludeContainerLabelRegex map[string]string `json:"IncludeContainerLabelRegex,omitempty"`
	ExcludeContainerLabelRegex map[string]string `json:"ExcludeContainerLabelRegex,omitempty"`
	IncludeContainerEnvRegex   map[string]string `json:"IncludeContainerEnvRegex,omitempty"`
	ExcludeContainerEnvRegex   map[string]string `json:"ExcludeContainerEnvRegex,omitempty"`
	EnvTag                     map[string]string `json:"EnvTag,omitempty"`
	KubernetesRule             KubernetesRule    `json:"KubernetesRule,omitempty"`
}

type CreateAlarmNotifyGroupRequest

type CreateAlarmNotifyGroupRequest struct {
	CommonRequest
	GroupName  string      `json:"AlarmNotifyGroupName"`
	NoticeType NoticeTypes `json:"NotifyType"`
	Receivers  Receivers   `json:"Receivers"`
}

func (*CreateAlarmNotifyGroupRequest) CheckValidation

func (v *CreateAlarmNotifyGroupRequest) CheckValidation() error

type CreateAlarmNotifyGroupResponse

type CreateAlarmNotifyGroupResponse struct {
	CommonResponse
	NotifyGroupID string `json:"AlarmNotifyGroupId"`
}

type CreateAlarmRequest

type CreateAlarmRequest struct {
	CommonRequest
	AlarmName        string        `json:"AlarmName"`
	ProjectID        string        `json:"ProjectId"`
	Status           *bool         `json:"Status,omitempty"`
	QueryRequest     QueryRequests `json:"QueryRequest"`
	RequestCycle     RequestCycle  `json:"RequestCycle"`
	Condition        string        `json:"Condition"`
	TriggerPeriod    int           `json:"TriggerPeriod"`
	AlarmPeriod      int           `json:"AlarmPeriod"`
	AlarmNotifyGroup []string      `json:"AlarmNotifyGroup"`
	UserDefineMsg    *string       `json:"UserDefineMsg,omitempty"`
}

func (*CreateAlarmRequest) CheckValidation

func (v *CreateAlarmRequest) CheckValidation() error

type CreateAlarmResponse

type CreateAlarmResponse struct {
	CommonResponse
	AlarmID string `json:"AlarmId"`
}

type CreateConsumerGroupRequest

type CreateConsumerGroupRequest struct {
	ProjectID         string   `json:"ProjectID"`
	TopicIDList       []string `json:"TopicIDList"`
	ConsumerGroupName string   `json:"ConsumerGroupName"`
	HeartbeatTTL      int      `json:"HeartbeatTTL"`
	OrderedConsume    bool     `json:"OrderedConsume"`
}

type CreateConsumerGroupResponse

type CreateConsumerGroupResponse struct {
	CommonResponse
}

type CreateDownloadTaskRequest

type CreateDownloadTaskRequest struct {
	CommonRequest
	TopicID     string `json:"TopicId"`
	TaskName    string
	Query       string
	StartTime   int64
	EndTime     int64
	Compression string
	DataFormat  string
	Limit       int
	Sort        string
}

func (*CreateDownloadTaskRequest) CheckValidation

func (v *CreateDownloadTaskRequest) CheckValidation() error

type CreateDownloadTaskResponse

type CreateDownloadTaskResponse struct {
	CommonResponse
	TaskId string
}

type CreateHostGroupRequest

type CreateHostGroupRequest struct {
	CommonRequest
	HostGroupName   string    `json:"HostGroupName"`
	HostGroupType   string    `json:"HostGroupType"`
	HostIdentifier  *string   `json:"HostIdentifier"`
	HostIPList      *[]string `json:"HostIpList"`
	AutoUpdate      *bool     `json:",omitempty"`
	UpdateStartTime *string   `json:",omitempty"`
	UpdateEndTime   *string   `json:",omitempty"`
}

func (*CreateHostGroupRequest) CheckValidation

func (v *CreateHostGroupRequest) CheckValidation() error

type CreateHostGroupResponse

type CreateHostGroupResponse struct {
	CommonResponse
	HostGroupID string `json:"HostGroupId"`
}

type CreateIndexRequest

type CreateIndexRequest struct {
	CommonRequest
	TopicID  string          `json:"TopicId"`
	FullText *FullTextInfo   `json:",omitempty"`
	KeyValue *[]KeyValueInfo `json:",omitempty"`
}

func (*CreateIndexRequest) CheckValidation

func (v *CreateIndexRequest) CheckValidation() error

type CreateIndexResponse

type CreateIndexResponse struct {
	CommonResponse
	TopicID string `json:"TopicId"`
}

type CreateProjectRequest

type CreateProjectRequest struct {
	CommonRequest
	ProjectName string
	Description string
	Region      string
}

func (*CreateProjectRequest) CheckValidation

func (v *CreateProjectRequest) CheckValidation() error

type CreateProjectResponse

type CreateProjectResponse struct {
	CommonResponse
	ProjectID string `json:"ProjectId"`
}

type CreateRuleRequest

type CreateRuleRequest struct {
	CommonRequest
	TopicID        string          `json:"TopicId"`
	RuleName       string          `json:"RuleName"`
	Paths          *[]string       `json:"Paths"`
	LogType        *string         `json:"LogType"`
	ExtractRule    *ExtractRule    `json:"ExtractRule"`
	ExcludePaths   *[]ExcludePath  `json:"ExcludePaths"`
	UserDefineRule *UserDefineRule `json:"UserDefineRule"`
	LogSample      *string         `json:"LogSample"`
	InputType      *int            `json:"InputType"`
	ContainerRule  *ContainerRule  `json:"ContainerRule"`
}

func (*CreateRuleRequest) CheckValidation

func (v *CreateRuleRequest) CheckValidation() error

type CreateRuleResponse

type CreateRuleResponse struct {
	CommonResponse
	RuleID string `json:"RuleId"`
}

type CreateTopicRequest

type CreateTopicRequest struct {
	CommonRequest
	ProjectID      string `json:"ProjectId"`
	TopicName      string `json:","`
	Ttl            uint16 `json:","`
	Description    string `json:","`
	ShardCount     int    `json:","`
	MaxSplitShard  *int32 `json:",omitempty"`
	AutoSplit      bool   `json:","`
	EnableTracking *bool  `json:",omitempty"`
}

func (*CreateTopicRequest) CheckValidation

func (v *CreateTopicRequest) CheckValidation() error

type CreateTopicResponse

type CreateTopicResponse struct {
	CommonResponse
	TopicID string `json:"TopicID"`
}

type DeleteAlarmNotifyGroupRequest

type DeleteAlarmNotifyGroupRequest struct {
	CommonRequest
	AlarmNotifyGroupID string `json:"AlarmNotifyGroupId"`
}

func (*DeleteAlarmNotifyGroupRequest) CheckValidation

func (v *DeleteAlarmNotifyGroupRequest) CheckValidation() error

type DeleteAlarmNotifyGroupResponse

type DeleteAlarmNotifyGroupResponse struct {
}

type DeleteAlarmRequest

type DeleteAlarmRequest struct {
	CommonRequest
	AlarmID string `json:"AlarmId"`
}

func (*DeleteAlarmRequest) CheckValidation

func (v *DeleteAlarmRequest) CheckValidation() error

type DeleteConsumerGroupRequest

type DeleteConsumerGroupRequest struct {
	ProjectID         string `json:"ProjectID"`
	ConsumerGroupName string `json:"ConsumerGroupName"`
}

type DeleteConsumerGroupResponse

type DeleteConsumerGroupResponse struct {
	CommonResponse
}

type DeleteHostGroupRequest

type DeleteHostGroupRequest struct {
	CommonRequest
	HostGroupID string `json:"HostGroupId"`
}

func (*DeleteHostGroupRequest) CheckValidation

func (v *DeleteHostGroupRequest) CheckValidation() error

type DeleteHostRequest

type DeleteHostRequest struct {
	CommonRequest
	HostGroupID string `json:"HostGroupId"`
	IP          string `json:"Ip"`
}

func (*DeleteHostRequest) CheckValidation

func (v *DeleteHostRequest) CheckValidation() error

type DeleteIndexRequest

type DeleteIndexRequest struct {
	CommonRequest
	TopicID string
}

func (*DeleteIndexRequest) CheckValidation

func (v *DeleteIndexRequest) CheckValidation() error

type DeleteProjectRequest

type DeleteProjectRequest struct {
	CommonRequest
	ProjectID string `json:"ProjectId"`
}

func (*DeleteProjectRequest) CheckValidation

func (v *DeleteProjectRequest) CheckValidation() error

type DeleteRuleFromHostGroupsRequest

type DeleteRuleFromHostGroupsRequest struct {
	CommonRequest
	RuleID       string   `json:"RuleId"`
	HostGroupIDs []string `json:"HostGroupIds"`
}

func (*DeleteRuleFromHostGroupsRequest) CheckValidation

func (v *DeleteRuleFromHostGroupsRequest) CheckValidation() error

type DeleteRuleRequest

type DeleteRuleRequest struct {
	CommonRequest
	RuleID string `json:"RuleId"`
}

func (*DeleteRuleRequest) CheckValidation

func (v *DeleteRuleRequest) CheckValidation() error

type DeleteTopicRequest

type DeleteTopicRequest struct {
	CommonRequest
	TopicID string
}

func (*DeleteTopicRequest) CheckValidation

func (v *DeleteTopicRequest) CheckValidation() error

type DescribeAlarmNotifyGroupsRequest

type DescribeAlarmNotifyGroupsRequest struct {
	CommonRequest
	GroupName     *string
	NotifyGroupID *string
	UserName      *string
	PageNumber    int
	PageSize      int
}

func (*DescribeAlarmNotifyGroupsRequest) CheckValidation

func (v *DescribeAlarmNotifyGroupsRequest) CheckValidation() error

type DescribeAlarmNotifyGroupsResponse

type DescribeAlarmNotifyGroupsResponse struct {
	CommonResponse
	Total             int64               `json:"Total"`
	AlarmNotifyGroups []*NotifyGroupsInfo `json:"AlarmNotifyGroups"`
}

type DescribeAlarmsRequest

type DescribeAlarmsRequest struct {
	CommonRequest
	ProjectID     string
	TopicID       *string
	TopicName     *string
	AlarmName     *string
	AlarmPolicyID *string
	Status        *bool
	PageNumber    int
	PageSize      int
}

func (*DescribeAlarmsRequest) CheckValidation

func (v *DescribeAlarmsRequest) CheckValidation() error

type DescribeAlarmsResponse

type DescribeAlarmsResponse struct {
	CommonResponse
	Total         int         `json:"Total"`
	AlarmPolicies []QueryResp `json:"Alarms"`
}

type DescribeCheckPointRequest

type DescribeCheckPointRequest struct {
	ProjectID         string `json:"ProjectID"`
	TopicID           string `json:"TopicID"`
	ConsumerGroupName string `json:"ConsumerGroupName"`
	ShardID           int    `json:"ShardID"`
}

type DescribeCheckPointResponse

type DescribeCheckPointResponse struct {
	CommonResponse
	ShardID    int32  `json:"ShardID"`
	Checkpoint string `json:"Checkpoint"`
	UpdateTime int    `json:"UpdateTime"`
	Consumer   string `json:"Consumer"`
}

type DescribeConsumerGroupsRequest

type DescribeConsumerGroupsRequest struct {
	ProjectID string `json:"ProjectID"`

	PageNumber int
	PageSize   int
}

type DescribeConsumerGroupsResponse

type DescribeConsumerGroupsResponse struct {
	CommonResponse
	ConsumerGroups []*ConsumerGroupResp `json:"ConsumerGroups"`
}

type DescribeCursorRequest

type DescribeCursorRequest struct {
	CommonRequest
	TopicID string
	ShardID int
	From    string
}

func (*DescribeCursorRequest) CheckValidation

func (v *DescribeCursorRequest) CheckValidation() error

type DescribeCursorResponse

type DescribeCursorResponse struct {
	CommonResponse
	Cursor string `json:"cursor"`
}

type DescribeDownloadTasksRequest

type DescribeDownloadTasksRequest struct {
	CommonRequest
	TopicID    string `json:"-"`
	PageNumber *int   `json:"-"`
	PageSize   *int   `json:"-"`
}

func (*DescribeDownloadTasksRequest) CheckValidation

func (v *DescribeDownloadTasksRequest) CheckValidation() error

type DescribeDownloadTasksResponse

type DescribeDownloadTasksResponse struct {
	CommonResponse
	Tasks []*DownloadTaskResp
	Total int64
}

type DescribeDownloadUrlRequest

type DescribeDownloadUrlRequest struct {
	CommonRequest
	TaskId string `json:"-"`
}

func (*DescribeDownloadUrlRequest) CheckValidation

func (v *DescribeDownloadUrlRequest) CheckValidation() error

type DescribeDownloadUrlResponse

type DescribeDownloadUrlResponse struct {
	CommonResponse
	DownloadUrl string
}

type DescribeHistogramRequest

type DescribeHistogramRequest struct {
	CommonRequest
	TopicID   string `json:"TopicId"`
	Query     string `json:","`
	StartTime int64  `json:","`
	EndTime   int64  `json:","`
	Interval  *int64 `json:",omitempty"`
}

func (*DescribeHistogramRequest) CheckValidation

func (v *DescribeHistogramRequest) CheckValidation() error

type DescribeHistogramResponse

type DescribeHistogramResponse struct {
	CommonResponse
	HistogramInfos []HistogramInfo `json:"Histogram"`
	Interval       int64           `json:"Interval"`
	TotalCount     int64           `json:"TotalCount"`
	ResultStatus   string          `json:"ResultStatus"`
}

type DescribeHostGroupRequest

type DescribeHostGroupRequest struct {
	CommonRequest
	HostGroupID string
}

func (*DescribeHostGroupRequest) CheckValidation

func (v *DescribeHostGroupRequest) CheckValidation() error

type DescribeHostGroupResponse

type DescribeHostGroupResponse struct {
	CommonResponse
	HostGroupHostsRulesInfo *HostGroupHostsRulesInfo `json:"HostGroupHostsRulesInfo"`
}

type DescribeHostGroupRulesRequest

type DescribeHostGroupRulesRequest struct {
	CommonRequest
	HostGroupID string
	PageNumber  int
	PageSize    int
}

func (*DescribeHostGroupRulesRequest) CheckValidation

func (v *DescribeHostGroupRulesRequest) CheckValidation() error

type DescribeHostGroupRulesResponse

type DescribeHostGroupRulesResponse struct {
	CommonResponse
	Total     int64       `json:"Total"`
	RuleInfos []*RuleInfo `json:"RuleInfos"`
}

type DescribeHostGroupsRequest

type DescribeHostGroupsRequest struct {
	CommonRequest
	PageNumber     int
	PageSize       int
	HostGroupID    *string `json:",omitempty"`
	HostGroupName  *string `json:",omitempty"`
	HostIdentifier *string `json:",omitempty"`
}

func (*DescribeHostGroupsRequest) CheckValidation

func (v *DescribeHostGroupsRequest) CheckValidation() error

type DescribeHostGroupsResponse

type DescribeHostGroupsResponse struct {
	CommonResponse
	Total                    int64                      `json:"Total"`
	HostGroupHostsRulesInfos []*HostGroupHostsRulesInfo `json:"HostGroupHostsRulesInfos"`
}

type DescribeHostsRequest

type DescribeHostsRequest struct {
	CommonRequest
	HostGroupID     string
	PageNumber      int
	PageSize        int
	IP              *string
	HeartbeatStatus *int
}

func (*DescribeHostsRequest) CheckValidation

func (v *DescribeHostsRequest) CheckValidation() error

type DescribeHostsResponse

type DescribeHostsResponse struct {
	CommonResponse
	Total     int64       `json:"Total"`
	HostInfos []*HostInfo `json:"HostInfos"`
}

type DescribeIndexRequest

type DescribeIndexRequest struct {
	CommonRequest
	TopicID string
}

func (*DescribeIndexRequest) CheckValidation

func (v *DescribeIndexRequest) CheckValidation() error

type DescribeIndexResponse

type DescribeIndexResponse struct {
	CommonResponse
	TopicID    string          `json:"TopicId"`
	FullText   *FullTextInfo   `json:"FullText"`
	KeyValue   *[]KeyValueInfo `json:"KeyValue"`
	CreateTime string          `json:"CreateTime"`
	ModifyTime string          `json:"ModifyTime"`
}

type DescribeKafkaConsumerRequest

type DescribeKafkaConsumerRequest struct {
	CommonRequest
	TopicID string `json:"-"`
}

func (*DescribeKafkaConsumerRequest) CheckValidation

func (v *DescribeKafkaConsumerRequest) CheckValidation() error

type DescribeKafkaConsumerResponse

type DescribeKafkaConsumerResponse struct {
	CommonResponse
	AllowConsume bool
	ConsumeTopic string
}

type DescribeLogContextRequest

type DescribeLogContextRequest struct {
	CommonRequest
	TopicId       string `json:"TopicId"`
	ContextFlow   string `json:"ContextFlow"`
	PackageOffset int64  `json:"PackageOffset"`
	Source        string `json:"Source"`
	PrevLogs      *int64 `json:",omitempty"`
	NextLogs      *int64 `json:",omitempty"`
}

func (*DescribeLogContextRequest) CheckValidation

func (v *DescribeLogContextRequest) CheckValidation() error

type DescribeLogContextResponse

type DescribeLogContextResponse struct {
	CommonResponse
	LogContextInfos []map[string]interface{} `json:"LogContextInfos"`
	PrevOver        bool                     `json:"PrevOver"`
	NextOver        bool                     `json:"NextOver"`
}

type DescribeProjectRequest

type DescribeProjectRequest struct {
	CommonRequest
	ProjectID string `json:"ProjectId"`
}

func (*DescribeProjectRequest) CheckValidation

func (v *DescribeProjectRequest) CheckValidation() error

type DescribeProjectResponse

type DescribeProjectResponse struct {
	CommonResponse
	ProjectInfo
}

type DescribeProjectsRequest

type DescribeProjectsRequest struct {
	CommonRequest
	ProjectName string
	ProjectID   string
	PageNumber  int
	PageSize    int
	IsFullName  bool
}

func (*DescribeProjectsRequest) CheckValidation

func (v *DescribeProjectsRequest) CheckValidation() error

type DescribeProjectsResponse

type DescribeProjectsResponse struct {
	CommonResponse
	Projects []ProjectInfo `json:"Projects"`

	Total int64 `json:"Total"`
}

type DescribeRuleRequest

type DescribeRuleRequest struct {
	CommonRequest
	RuleID string `json:"RuleId"`
}

func (*DescribeRuleRequest) CheckValidation

func (v *DescribeRuleRequest) CheckValidation() error

type DescribeRuleResponse

type DescribeRuleResponse struct {
	CommonResponse
	ProjectID      string           `json:"ProjectId"`
	ProjectName    string           `json:"ProjectName"`
	TopicID        string           `json:"TopicId"`
	TopicName      string           `json:"TopicName"`
	RuleInfo       *RuleInfo        `json:"RuleInfo"`
	HostGroupInfos []*HostGroupInfo `json:"HostGroupInfos"`
}

type DescribeRulesRequest

type DescribeRulesRequest struct {
	CommonRequest
	ProjectID  string  `json:"ProjectId"`
	PageNumber int     `json:"PageNumber"`
	PageSize   int     `json:"PageSize"`
	TopicID    *string `json:"TopicId,omitempty"`
	TopicName  *string `json:"TopicName,omitempty"`
	RuleID     *string `json:"RuleId,omitempty"`
	RuleName   *string `json:"RuleName,omitempty"`
}

func (*DescribeRulesRequest) CheckValidation

func (v *DescribeRulesRequest) CheckValidation() error

type DescribeRulesResponse

type DescribeRulesResponse struct {
	CommonResponse
	Total     int64       `json:"Total"`
	RuleInfos []*RuleInfo `json:"RuleInfos"`
}

type DescribeShardsRequest

type DescribeShardsRequest struct {
	CommonRequest
	TopicID    string
	PageNumber int
	PageSize   int
}

func (*DescribeShardsRequest) CheckValidation

func (v *DescribeShardsRequest) CheckValidation() error

type DescribeShardsResponse

type DescribeShardsResponse struct {
	CommonResponse
	Shards []*struct {
		TopicID           string `json:"TopicId"`
		ShardID           int32  `json:"ShardId"`
		InclusiveBeginKey string `json:"InclusiveBeginKey"`
		ExclusiveEndKey   string `json:"ExclusiveEndKey"`
		Status            string `json:"Status"`
		ModifyTimestamp   string `json:"ModifyTime"`
		StopWriteTime     string `json:"StopWriteTime"`
	} `json:"Shards"`

	Total int `json:"Total"`
}

type DescribeTopicRequest

type DescribeTopicRequest struct {
	CommonRequest
	TopicID string
}

func (*DescribeTopicRequest) CheckValidation

func (v *DescribeTopicRequest) CheckValidation() error

type DescribeTopicResponse

type DescribeTopicResponse struct {
	CommonResponse
	TopicName       string `json:"TopicName"`
	ProjectID       string `json:"ProjectId"`
	TopicID         string `json:"TopicId"`
	Ttl             uint16 `json:"Ttl"`
	CreateTimestamp string `json:"CreateTime"`
	ModifyTimestamp string `json:"ModifyTime"`
	ShardCount      int32  `json:"ShardCount"`
	Description     string `json:"Description"`
	MaxSplitShard   int32  `json:"MaxSplitShard"`
	AutoSplit       bool   `json:"AutoSplit"`
	EnableTracking  bool   `json:"EnableTracking"`
}

type DescribeTopicsRequest

type DescribeTopicsRequest struct {
	CommonRequest
	ProjectID  string
	PageNumber int
	PageSize   int
	TopicName  string
	TopicID    string
	IsFullName bool
}

func (*DescribeTopicsRequest) CheckValidation

func (v *DescribeTopicsRequest) CheckValidation() error

type DescribeTopicsResponse

type DescribeTopicsResponse struct {
	CommonResponse
	Topics []*Topic `json:"Topics"`
	Total  int      `json:"Total"`
}

type DownloadTaskResp

type DownloadTaskResp struct {
	TaskId      string
	TaskName    string
	TopicId     string
	Query       string
	StartTime   string
	EndTime     string
	LogCount    int64
	LogSize     int64
	Compression string
	DataFormat  string
	TaskStatus  string
	CreateTime  string
}

type Error

type Error struct {
	HTTPCode  int32  `json:"httpCode"`
	Code      string `json:"errorCode"`
	Message   string `json:"errorMessage"`
	RequestID string `json:"requestID"`
}

func NewClientError

func NewClientError(err error) *Error

func (Error) Error

func (e Error) Error() string

func (Error) String

func (e Error) String() string

type ExcludePath

type ExcludePath struct {
	Type  string `json:"Type,omitempty"`
	Value string `json:"Value,omitempty"`
}

type ExtractRule

type ExtractRule struct {
	Delimiter           string           `json:"Delimiter,omitempty"`
	BeginRegex          string           `json:"BeginRegex,omitempty"`
	LogRegex            string           `json:"LogRegex,omitempty"`
	Keys                []string         `json:"Keys,omitempty"`
	TimeKey             string           `json:"TimeKey,omitempty"`
	TimeFormat          string           `json:"TimeFormat,omitempty"`
	FilterKeyRegex      []FilterKeyRegex `json:"FilterKeyRegex,omitempty"`
	UnMatchUpLoadSwitch bool             `json:"UnMatchUpLoadSwitch"`
	UnMatchLogKey       string           `json:"UnMatchLogKey,omitempty"`
	LogTemplate         LogTemplate      `json:"LogTemplate,omitempty"`
}

type FilterKeyRegex

type FilterKeyRegex struct {
	Key   string `json:"Key,omitempty"`
	Regex string `json:"Regex,omitempty"`
}

type FullTextInfo

type FullTextInfo struct {
	Delimiter      string `json:"Delimiter"`
	CaseSensitive  bool   `json:"CaseSensitive"`
	IncludeChinese bool   `json:"IncludeChinese"`
}

type HistogramInfo

type HistogramInfo struct {
	Count int64 `json:"Count"`
	Time  int64 `json:"Time"`
}

type HostGroupHostsRulesInfo

type HostGroupHostsRulesInfo struct {
	HostGroupInfo *HostGroupInfo `json:"HostGroupInfo"`
	HostInfos     []*HostInfo    `json:"HostInfos"`
	RuleInfos     []*RuleInfo    `json:"RuleInfos"`
}

type HostGroupInfo

type HostGroupInfo struct {
	HostGroupID                   string `json:"HostGroupId"`
	HostGroupName                 string `json:"HostGroupName"`
	HostGroupType                 string `json:"HostGroupType"`
	HostIdentifier                string `json:"HostIdentifier"`
	HostCount                     int    `json:"HostCount"`
	NormalHeartbeatStatusNumber   int    `json:"NormalHeartbeatStatusCount"`
	AbnormalHeartbeatStatusNumber int    `json:"AbnormalHeartbeatStatusCount"`
	RuleCount                     int    `json:"RuleCount"`
	CreateTime                    string `json:"CreateTime"`
	ModifyTime                    string `json:"ModifyTime"`
	AutoUpdate                    bool   `json:"AutoUpdate"`
	UpdateStartTime               string `json:"UpdateStartTime"`
	UpdateEndTime                 string `json:"UpdateEndTime"`
	AgentLatestVersion            string `json:"AgentLatestVersion"`
}

type HostInfo

type HostInfo struct {
	IP                  string `json:"Ip"`
	LogCollectorVersion string `json:"LogCollectorVersion"`
	HeartbeatStatus     int    `json:"HeartbeatStatus"`
}

type KeyValueInfo

type KeyValueInfo struct {
	Key   string
	Value Value
}

type KeyValueList

type KeyValueList []KeyValueParam

func (KeyValueList) Value

func (c KeyValueList) Value() (driver.Value, error)

type KeyValueParam

type KeyValueParam struct {
	Key   string `json:"key"`
	Value Value  `json:"value"`
}

type KubernetesRule

type KubernetesRule struct {
	NamespaceNameRegex   string            `json:"NamespaceNameRegex,omitempty"`
	WorkloadType         string            `json:"WorkloadType,omitempty"`
	WorkloadNameRegex    string            `json:"WorkloadNameRegex,omitempty"`
	PodNameRegex         string            `json:"PodNameRegex,omitempty"`
	IncludePodLabelRegex map[string]string `json:"IncludePodLabelRegex,omitempty"`
	ExcludePodLabelRegex map[string]string `json:"ExcludePodLabelRegex,omitempty"`
	LabelTag             map[string]string `json:"LabelTag,omitempty"`
}

type Log

type Log struct {
	Contents []LogContent
	Time     int64 // 可以不填, 默认使用当前时间
}

type LogContent

type LogContent struct {
	Key   string
	Value string
}

type LogTemplate

type LogTemplate struct {
	Type   string `json:"Type,omitempty"`
	Format string `json:"Format,omitempty"`
}

type LsClient

type LsClient struct {
	BaseClient *base.Client
	Endpoint   string

	AccessKeyID     string
	AccessKeySecret string
	SecurityToken   string
	UserAgent       string
	RequestTimeOut  time.Duration
	Region          string
	APIVersion      string
	// contains filtered or unexported fields
}

func (*LsClient) ApplyRuleToHostGroups

func (c *LsClient) ApplyRuleToHostGroups(request *ApplyRuleToHostGroupsRequest) (r *CommonResponse, e error)

func (*LsClient) Close

func (c *LsClient) Close() error

func (*LsClient) CloseKafkaConsumer

func (c *LsClient) CloseKafkaConsumer(request *CloseKafkaConsumerRequest) (r *CloseKafkaConsumerResponse, e error)

func (*LsClient) ConsumeLogs

func (c *LsClient) ConsumeLogs(request *ConsumeLogsRequest) (r *ConsumeLogsResponse, e error)

func (*LsClient) ConsumerHeartbeat

func (c *LsClient) ConsumerHeartbeat(request *ConsumerHeartbeatRequest) (*ConsumerHeartbeatResponse, error)

func (*LsClient) CreateAlarm

func (c *LsClient) CreateAlarm(request *CreateAlarmRequest) (r *CreateAlarmResponse, e error)

func (*LsClient) CreateAlarmNotifyGroup

func (c *LsClient) CreateAlarmNotifyGroup(request *CreateAlarmNotifyGroupRequest) (r *CreateAlarmNotifyGroupResponse, e error)

func (*LsClient) CreateConsumerGroup

func (c *LsClient) CreateConsumerGroup(request *CreateConsumerGroupRequest) (*CreateConsumerGroupResponse, error)

func (*LsClient) CreateDownloadTask

func (c *LsClient) CreateDownloadTask(request *CreateDownloadTaskRequest) (r *CreateDownloadTaskResponse, e error)

func (*LsClient) CreateHostGroup

func (c *LsClient) CreateHostGroup(request *CreateHostGroupRequest) (r *CreateHostGroupResponse, e error)

func (*LsClient) CreateIndex

func (c *LsClient) CreateIndex(request *CreateIndexRequest) (r *CreateIndexResponse, e error)

func (*LsClient) CreateProject

func (c *LsClient) CreateProject(request *CreateProjectRequest) (r *CreateProjectResponse, e error)

func (*LsClient) CreateRule

func (c *LsClient) CreateRule(request *CreateRuleRequest) (r *CreateRuleResponse, e error)

func (*LsClient) CreateTopic

func (c *LsClient) CreateTopic(request *CreateTopicRequest) (r *CreateTopicResponse, e error)

func (*LsClient) DeleteAlarm

func (c *LsClient) DeleteAlarm(request *DeleteAlarmRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteAlarmNotifyGroup

func (c *LsClient) DeleteAlarmNotifyGroup(request *DeleteAlarmNotifyGroupRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteConsumerGroup

func (c *LsClient) DeleteConsumerGroup(request *DeleteConsumerGroupRequest) (*CommonResponse, error)

func (*LsClient) DeleteHost

func (c *LsClient) DeleteHost(request *DeleteHostRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteHostGroup

func (c *LsClient) DeleteHostGroup(request *DeleteHostGroupRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteIndex

func (c *LsClient) DeleteIndex(request *DeleteIndexRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteProject

func (c *LsClient) DeleteProject(request *DeleteProjectRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteRule

func (c *LsClient) DeleteRule(request *DeleteRuleRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteRuleFromHostGroups

func (c *LsClient) DeleteRuleFromHostGroups(request *DeleteRuleFromHostGroupsRequest) (r *CommonResponse, e error)

func (*LsClient) DeleteTopic

func (c *LsClient) DeleteTopic(request *DeleteTopicRequest) (r *CommonResponse, e error)

func (*LsClient) DescribeAlarmNotifyGroups

func (c *LsClient) DescribeAlarmNotifyGroups(request *DescribeAlarmNotifyGroupsRequest) (r *DescribeAlarmNotifyGroupsResponse, e error)

func (*LsClient) DescribeAlarms

func (c *LsClient) DescribeAlarms(request *DescribeAlarmsRequest) (r *DescribeAlarmsResponse, e error)

func (*LsClient) DescribeCheckPoint

func (c *LsClient) DescribeCheckPoint(request *DescribeCheckPointRequest) (*DescribeCheckPointResponse, error)

func (*LsClient) DescribeConsumerGroups

func (c *LsClient) DescribeConsumerGroups(request *DescribeConsumerGroupsRequest) (*DescribeConsumerGroupsResponse, error)

func (*LsClient) DescribeCursor

func (c *LsClient) DescribeCursor(request *DescribeCursorRequest) (r *DescribeCursorResponse, e error)

func (*LsClient) DescribeDownloadTasks

func (c *LsClient) DescribeDownloadTasks(request *DescribeDownloadTasksRequest) (r *DescribeDownloadTasksResponse, e error)

func (*LsClient) DescribeDownloadUrl

func (c *LsClient) DescribeDownloadUrl(request *DescribeDownloadUrlRequest) (r *DescribeDownloadUrlResponse, e error)

func (*LsClient) DescribeHistogram

func (c *LsClient) DescribeHistogram(request *DescribeHistogramRequest) (r *DescribeHistogramResponse, e error)

func (*LsClient) DescribeHostGroup

func (c *LsClient) DescribeHostGroup(request *DescribeHostGroupRequest) (r *DescribeHostGroupResponse, e error)

func (*LsClient) DescribeHostGroupRules

func (c *LsClient) DescribeHostGroupRules(request *DescribeHostGroupRulesRequest) (r *DescribeHostGroupRulesResponse, e error)

func (*LsClient) DescribeHostGroups

func (c *LsClient) DescribeHostGroups(request *DescribeHostGroupsRequest) (r *DescribeHostGroupsResponse, e error)

func (*LsClient) DescribeHosts

func (c *LsClient) DescribeHosts(request *DescribeHostsRequest) (r *DescribeHostsResponse, e error)

func (*LsClient) DescribeIndex

func (c *LsClient) DescribeIndex(request *DescribeIndexRequest) (r *DescribeIndexResponse, e error)

func (*LsClient) DescribeKafkaConsumer

func (c *LsClient) DescribeKafkaConsumer(request *DescribeKafkaConsumerRequest) (r *DescribeKafkaConsumerResponse, e error)

func (*LsClient) DescribeLogContext

func (c *LsClient) DescribeLogContext(request *DescribeLogContextRequest) (r *DescribeLogContextResponse, e error)

func (*LsClient) DescribeProject

func (c *LsClient) DescribeProject(request *DescribeProjectRequest) (r *DescribeProjectResponse, e error)

func (*LsClient) DescribeProjects

func (c *LsClient) DescribeProjects(request *DescribeProjectsRequest) (r *DescribeProjectsResponse, e error)

func (*LsClient) DescribeRule

func (c *LsClient) DescribeRule(request *DescribeRuleRequest) (r *DescribeRuleResponse, e error)

func (*LsClient) DescribeRules

func (c *LsClient) DescribeRules(request *DescribeRulesRequest) (r *DescribeRulesResponse, e error)

func (*LsClient) DescribeShards

func (c *LsClient) DescribeShards(request *DescribeShardsRequest) (r *DescribeShardsResponse, e error)

func (*LsClient) DescribeTopic

func (c *LsClient) DescribeTopic(request *DescribeTopicRequest) (r *DescribeTopicResponse, e error)

func (*LsClient) DescribeTopics

func (c *LsClient) DescribeTopics(request *DescribeTopicsRequest) (r *DescribeTopicsResponse, e error)

func (*LsClient) ModifyAlarm

func (c *LsClient) ModifyAlarm(request *ModifyAlarmRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyAlarmNotifyGroup

func (c *LsClient) ModifyAlarmNotifyGroup(request *ModifyAlarmNotifyGroupRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyCheckPoint

func (c *LsClient) ModifyCheckPoint(request *ModifyCheckPointRequest) (*CommonResponse, error)

func (*LsClient) ModifyConsumerGroup

func (c *LsClient) ModifyConsumerGroup(request *ModifyConsumerGroupRequest) (*CommonResponse, error)

func (*LsClient) ModifyHostGroup

func (c *LsClient) ModifyHostGroup(request *ModifyHostGroupRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyHostGroupsAutoUpdate

func (c *LsClient) ModifyHostGroupsAutoUpdate(request *ModifyHostGroupsAutoUpdateRequest) (r *ModifyHostGroupsAutoUpdateResponse, e error)

func (*LsClient) ModifyIndex

func (c *LsClient) ModifyIndex(request *ModifyIndexRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyProject

func (c *LsClient) ModifyProject(request *ModifyProjectRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyRule

func (c *LsClient) ModifyRule(request *ModifyRuleRequest) (r *CommonResponse, e error)

func (*LsClient) ModifyTopic

func (c *LsClient) ModifyTopic(request *ModifyTopicRequest) (r *CommonResponse, e error)

func (*LsClient) OpenKafkaConsumer

func (c *LsClient) OpenKafkaConsumer(request *OpenKafkaConsumerRequest) (r *OpenKafkaConsumerResponse, e error)

func (*LsClient) PutLogs

func (c *LsClient) PutLogs(request *PutLogsRequest) (r *CommonResponse, e error)

func (*LsClient) PutLogsV2

func (c *LsClient) PutLogsV2(request *PutLogsV2Request) (r *CommonResponse, e error)

func (*LsClient) Request

func (c *LsClient) Request(method, uri string, params map[string]string, headers map[string]string, body []byte) (rsp *http.Response, e error)

func (*LsClient) ResetAccessKeyToken

func (c *LsClient) ResetAccessKeyToken(accessKeyID, accessKeySecret, securityToken string)

ResetAccessKeyToken reset client's access key token

func (*LsClient) SearchLogs

func (c *LsClient) SearchLogs(request *SearchLogsRequest) (r *SearchLogsResponse, e error)

func (*LsClient) SearchLogsV2 added in v1.0.102

func (c *LsClient) SearchLogsV2(request *SearchLogsRequest) (*SearchLogsResponse, error)

SearchLogsV2 搜索按照0.3.0api版本进行,和默认的0.2.0版本区别见文档https://www.volcengine.com/docs/6470/112170

func (*LsClient) SetAPIVersion added in v1.0.102

func (c *LsClient) SetAPIVersion(version string)

func (*LsClient) SetRetryCounterMaximum

func (c *LsClient) SetRetryCounterMaximum(maximum int32)

func (*LsClient) SetRetryIntervalMs

func (c *LsClient) SetRetryIntervalMs(interval time.Duration)

func (*LsClient) SetTimeout

func (c *LsClient) SetTimeout(timeout time.Duration)

func (*LsClient) String

func (c *LsClient) String() string

func (*LsClient) WebTracks

func (c *LsClient) WebTracks(request *WebTracksRequest) (r *WebTracksResponse, e error)

type ModifyAlarmNotifyGroupRequest

type ModifyAlarmNotifyGroupRequest struct {
	CommonRequest
	AlarmNotifyGroupID   string       `json:"AlarmNotifyGroupId"`
	AlarmNotifyGroupName *string      `json:"AlarmNotifyGroupName,omitempty"`
	NoticeType           *NoticeTypes `json:"NotifyType,omitempty"`
	Receivers            *Receivers   `json:"Receivers,omitempty"`
}

func (*ModifyAlarmNotifyGroupRequest) CheckValidation

func (v *ModifyAlarmNotifyGroupRequest) CheckValidation() error

type ModifyAlarmRequest

type ModifyAlarmRequest struct {
	CommonRequest
	AlarmID          string         `json:"AlarmId"`
	AlarmName        *string        `json:"AlarmName"`
	Status           *bool          `json:"Status"`
	QueryRequest     *QueryRequests `json:"QueryRequest"`
	RequestCycle     *RequestCycle  `json:"RequestCycle"`
	Condition        *string        `json:"Condition"`
	TriggerPeriod    *int           `json:"TriggerPeriod"`
	AlarmPeriod      *int           `json:"AlarmPeriod"`
	AlarmNotifyGroup *[]string      `json:"AlarmNotifyGroup"`
	UserDefineMsg    *string        `json:"UserDefineMsg"`
}

func (*ModifyAlarmRequest) CheckValidation

func (v *ModifyAlarmRequest) CheckValidation() error

type ModifyCheckPointRequest

type ModifyCheckPointRequest struct {
	ProjectID         string `json:"ProjectID"`
	TopicID           string `json:"TopicID"`
	ConsumerGroupName string `json:"ConsumerGroupName"`
	ShardID           int    `json:"ShardID"`
	Checkpoint        string `json:"Checkpoint"`
}

type ModifyCheckPointResponse

type ModifyCheckPointResponse struct {
	CommonResponse
}

type ModifyConsumerGroupRequest

type ModifyConsumerGroupRequest struct {
	ProjectID         string    `json:"ProjectID"`
	TopicIDList       *[]string `json:"TopicIDList"`
	ConsumerGroupName string    `json:"ConsumerGroupName"`
	HeartbeatTTL      *int      `json:"HeartbeatTTL"`
	OrderedConsume    *bool     `json:"OrderedConsume"`
}

type ModifyConsumerGroupResponse

type ModifyConsumerGroupResponse struct {
	CommonResponse
}

type ModifyHostGroupRequest

type ModifyHostGroupRequest struct {
	CommonRequest
	HostGroupID     string    `json:"HostGroupId"`
	HostGroupName   *string   `json:"HostGroupName,omitempty"`
	HostGroupType   *string   `json:"HostGroupType,omitempty"`
	HostIPList      *[]string `json:"HostIpList,omitempty"`
	HostIdentifier  *string   `json:"HostIdentifier,omitempty"`
	AutoUpdate      *bool     `json:",omitempty"`
	UpdateStartTime *string   `json:",omitempty"`
	UpdateEndTime   *string   `json:",omitempty"`
}

func (*ModifyHostGroupRequest) CheckValidation

func (v *ModifyHostGroupRequest) CheckValidation() error

type ModifyHostGroupsAutoUpdateRequest

type ModifyHostGroupsAutoUpdateRequest struct {
	CommonRequest
	HostGroupIds    []string
	AutoUpdate      *bool   `json:",omitempty"`
	UpdateStartTime *string `json:",omitempty"`
	UpdateEndTime   *string `json:",omitempty"`
}

func (*ModifyHostGroupsAutoUpdateRequest) CheckValidation

func (v *ModifyHostGroupsAutoUpdateRequest) CheckValidation() error

type ModifyHostGroupsAutoUpdateResponse

type ModifyHostGroupsAutoUpdateResponse struct {
	CommonResponse
}

type ModifyIndexRequest

type ModifyIndexRequest struct {
	CommonRequest
	TopicID  string          `json:"TopicId"`
	FullText *FullTextInfo   `json:",omitempty"`
	KeyValue *[]KeyValueInfo `json:",omitempty"`
}

func (*ModifyIndexRequest) CheckValidation

func (v *ModifyIndexRequest) CheckValidation() error

type ModifyProjectRequest

type ModifyProjectRequest struct {
	CommonRequest
	ProjectID   string
	ProjectName *string `json:",omitempty"`
	Description *string `json:",omitempty"`
}

func (*ModifyProjectRequest) CheckValidation

func (v *ModifyProjectRequest) CheckValidation() error

type ModifyRuleRequest

type ModifyRuleRequest struct {
	CommonRequest
	RuleID         string          `json:"RuleId,omitempty"`
	RuleName       *string         `json:"RuleName,omitempty"`
	Paths          *[]string       `json:"Paths,omitempty"`
	LogType        *string         `json:"LogType,omitempty"`
	ExtractRule    *ExtractRule    `json:"ExtractRule,omitempty"`
	ExcludePaths   *[]ExcludePath  `json:"ExcludePaths,omitempty"`
	UserDefineRule *UserDefineRule `json:"UserDefineRule,omitempty"`
	LogSample      *string         `json:"LogSample,omitempty"`
	InputType      *int            `json:"InputType,omitempty"`
	ContainerRule  *ContainerRule  `json:"ContainerRule,omitempty"`
}

func (*ModifyRuleRequest) CheckValidation

func (v *ModifyRuleRequest) CheckValidation() error

type ModifyTopicRequest

type ModifyTopicRequest struct {
	CommonRequest
	TopicID        string  `json:"TopicId"`
	TopicName      *string `json:",omitempty"`
	Ttl            *uint16 `json:",omitempty"`
	Description    *string `json:",omitempty"`
	MaxSplitShard  *int32  `json:",omitempty"`
	AutoSplit      *bool   `json:",omitempty"`
	EnableTracking *bool   `json:",omitempty"`
}

func (*ModifyTopicRequest) CheckValidation

func (v *ModifyTopicRequest) CheckValidation() error

type NoticeType

type NoticeType string

type NoticeTypes

type NoticeTypes []NoticeType

type NotifyGroupsInfo

type NotifyGroupsInfo struct {
	GroupName       string      `json:"AlarmNotifyGroupName"`
	NotifyGroupID   string      `json:"AlarmNotifyGroupId"`
	NoticeType      NoticeTypes `json:"NotifyType"`
	Receivers       Receivers   `json:"Receivers"`
	CreateTimestamp string      `json:"CreateTime"`
	ModifyTimestamp string      `json:"ModifyTime"`
}

type OpenKafkaConsumerRequest

type OpenKafkaConsumerRequest struct {
	CommonRequest
	TopicID string `json:"TopicId"`
}

func (*OpenKafkaConsumerRequest) CheckValidation

func (v *OpenKafkaConsumerRequest) CheckValidation() error

type OpenKafkaConsumerResponse

type OpenKafkaConsumerResponse struct {
	CommonResponse
}

type ParsePathRule

type ParsePathRule struct {
	PathSample string   `json:"PathSample,omitempty"`
	Regex      string   `json:"Regex,omitempty"`
	Keys       []string `json:"Keys,omitempty"`
}

type ProjectInfo

type ProjectInfo struct {
	ProjectID       string `json:"ProjectId"`
	ProjectName     string `json:"ProjectName"`
	Description     string `json:"Description"`
	CreateTimestamp string `json:"CreateTime"`
	TopicCount      int64  `json:"TopicCount"`
	InnerNetDomain  string `json:"InnerNetDomain"`
}

type PutLogsRequest

type PutLogsRequest struct {
	CommonRequest
	TopicID      string
	HashKey      string
	CompressType string
	LogBody      *pb.LogGroupList
}

func (*PutLogsRequest) CheckValidation

func (v *PutLogsRequest) CheckValidation() error

type PutLogsV2Request

type PutLogsV2Request struct {
	CommonRequest
	TopicID      string
	HashKey      string
	CompressType string
	Source       string
	FileName     string
	Logs         []Log
}

type QueryRequest

type QueryRequest struct {
	CommonRequest
	Query           string `json:"Query"`
	Number          uint8  `json:"Number"`
	TopicID         string `json:"TopicId"`
	TopicName       string `json:"TopicName,omitempty"`
	StartTimeOffset int    `json:"StartTimeOffset"`
	EndTimeOffset   int    `json:"EndTimeOffset"`
}

type QueryRequests

type QueryRequests []QueryRequest

type QueryResp

type QueryResp struct {
	AlarmID          string             `json:"AlarmId"`
	AlarmName        string             `json:"AlarmName"`
	ProjectID        string             `json:"ProjectId"`
	Status           bool               `json:"Status"`
	QueryRequest     []QueryRequest     `json:"QueryRequest"`
	RequestCycle     RequestCycle       `json:"RequestCycle"`
	Condition        string             `json:"Condition"`
	TriggerPeriod    int                `json:"TriggerPeriod"`
	AlarmPeriod      int                `json:"AlarmPeriod"`
	AlarmNotifyGroup []NotifyGroupsInfo `json:"AlarmNotifyGroup"`
	UserDefineMsg    string             `json:"UserDefineMsg"`
	CreateTimestamp  string             `json:"CreateTime"`
	ModifyTimestamp  string             `json:"ModifyTime"`
}

type Receiver

type Receiver struct {
	ReceiverType     ReveiverType      `json:"ReceiverType"`
	ReceiverNames    []string          `json:"ReceiverNames"`
	ReceiverChannels []ReceiverChannel `json:"ReceiverChannels"`
	StartTime        string            `json:"StartTime"`
	EndTime          string            `json:"EndTime"`
	Webhook          string            `json:",omitempty"`
}

type ReceiverChannel

type ReceiverChannel string

type Receivers

type Receivers []Receiver

type RequestCycle

type RequestCycle struct {
	Type string `json:"Type"`
	Time int    `json:"Time"`
}

type ReveiverType

type ReveiverType string

type RuleInfo

type RuleInfo struct {
	TopicID        string         `json:"TopicId"`
	TopicName      string         `json:"TopicName"`
	RuleID         string         `json:"RuleId"`
	RuleName       string         `json:"RuleName"`
	Paths          []string       `json:"Paths"`
	LogType        string         `json:"LogType"`
	ExtractRule    ExtractRule    `json:"ExtractRule"`
	ExcludePaths   []ExcludePath  `json:"ExcludePaths"`
	UserDefineRule UserDefineRule `json:"UserDefineRule"`
	LogSample      string         `json:"LogSample"`
	InputType      int            `json:"InputType"`
	ContainerRule  ContainerRule  `json:"ContainerRule"`
	CreateTime     string         `json:"CreateTime"`
	ModifyTime     string         `json:"ModifyTime"`
}

type SearchLogsRequest

type SearchLogsRequest struct {
	CommonRequest
	TopicID   string `json:"TopicId"`
	Query     string `json:"Query"`
	StartTime int64  `json:"StartTime"`
	EndTime   int64  `json:"EndTime"`
	Limit     int    `json:"Limit"`
	HighLight bool   `json:"HighLight"`
	Context   string `json:"Context"`
	Sort      string `json:"Sort"`
}

func (*SearchLogsRequest) CheckValidation

func (v *SearchLogsRequest) CheckValidation() error

type SearchLogsResponse

type SearchLogsResponse struct {
	CommonResponse
	Status         string                   `json:"ResultStatus"`
	Analysis       bool                     `json:"Analysis"`
	ListOver       bool                     `json:"ListOver"`
	HitCount       int                      `json:"HitCount"`
	Count          int                      `json:"Count"`
	Limit          int                      `json:"Limit"`
	Logs           []map[string]interface{} `json:"Logs"`
	AnalysisResult *AnalysisResult          `json:"AnalysisResult"`
	Context        string                   `json:"Context"`
	HighLight      []string                 `json:"HighLight,omitempty"`
}

type ShardHashKey

type ShardHashKey struct {
	HashKey string `json:"HashKey,omitempty"`
}

type Topic

type Topic struct {
	TopicName       string `json:"TopicName"`
	ProjectID       string `json:"ProjectId"`
	TopicID         string `json:"TopicId"`
	Ttl             uint16 `json:"Ttl"`
	CreateTimestamp string `json:"CreateTime"`
	ModifyTimestamp string `json:"ModifyTime"`
	ShardCount      int32  `json:"ShardCount"`
	Description     string `json:"Description"`
	MaxSplitShard   int32  `json:"MaxSplitShard"`
	AutoSplit       bool   `json:"AutoSplit"`
	EnableTracking  bool   `json:"EnableTracking"`
}

type UserDefineRule

type UserDefineRule struct {
	ParsePathRule *ParsePathRule    `json:"ParsePathRule,omitempty"`
	ShardHashKey  *ShardHashKey     `json:"ShardHashKey,omitempty"`
	EnableRawLog  bool              `json:"EnableRawLog,omitempty"`
	Fields        map[string]string `json:"Fields,omitempty"`
}

type Value

type Value struct {
	ValueType      string         `json:"ValueType"`
	Delimiter      string         `json:"Delimiter"`
	CasSensitive   bool           `json:"CaseSensitive"`
	IncludeChinese bool           `json:"IncludeChinese"`
	SQLFlag        bool           `json:"SqlFlag"`
	JsonKeys       []KeyValueInfo `json:"JsonKeys"`
}

type WebTracksRequest

type WebTracksRequest struct {
	CommonRequest
	TopicID      string `json:"-"`
	ProjectID    string `json:"-"`
	CompressType string `json:"-"`
	Logs         []map[string]string
	Source       string `json:"Source,omitempty"`
}

func (*WebTracksRequest) CheckValidation

func (v *WebTracksRequest) CheckValidation() error

type WebTracksResponse

type WebTracksResponse struct {
	CommonResponse
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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