cloud_structuring

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) error

func Delete

func Delete(client *golangsdk.ServiceClient, id string) (err error)

Delete is used to delete a structuring rule of a log stream.

func Update

func Update(client *golangsdk.ServiceClient, opts CreateOpts) error

Types

type BriefCustomTemplate

type BriefCustomTemplate struct {
	// Template creation/update time.
	CreatedAt int64 `json:"create_time"`
	// Template ID.
	ID string `json:"id"`
	// Template name.
	Name string `json:"template_name"`
	// Structuring type. Currently, regular expression, JSON, delimiters, and Nginx are supported.
	Type string `json:"template_type"`
	// Project ID.
	ProjectId string `json:"project_id"`
}

func ListBrief

func ListBrief(client *golangsdk.ServiceClient) ([]BriefCustomTemplate, error)

type ClusterResponse

type ClusterResponse struct {
	// Kafka cluster name.
	ClusterName string `json:"cluster_name"`
	// Kafka cluster server address.
	Address string `json:"kafka_bootstrap_servers"`
	// Whether SSL encrypted authentication is enabled for Kafka.
	SslEnable bool `json:"kafka_ssl_enable"`
}

type CreateOpts

type CreateOpts struct {
	// Log group ID.
	LogGroupId string `json:"log_group_id" required:"true"`
	// Log stream ID
	LogStreamId string `json:"log_stream_id" required:"true"`
	// Template ID.
	// When the system template is used, the current attribute can be empty.
	TemplateId *string `json:"template_id,omitempty"`
	// Template name, which cannot be empty and will be verified.
	Name string `json:"template_name" required:"true"`
	// Type of the template. The value can be `built_in` (system templates) or `custom` (custom templates).
	// For details about system template types,
	// see section "Log Search and Analysis" > "Cloud Structuring Parsing" > "Structuring Templates" in the LTS User Guide.
	Type string `json:"template_type" required:"true"`
	// Example field array
	// . You only need to enter the fields whose status is different from that of `is_analysis` in the template.
	DemoFields []Field `json:"demo_fields,omitempty"`
	// Tag field array. You only need to enter the fields whose status is different from that of `is_analysis` in the template.
	TagFields []Field `json:"tag_fields,omitempty"`
	// Indicates whether to enable quick analysis for demo_fields and tag_fields.
	// If this parameter is set to true, quick analysis is enabled for all fields.
	// If this parameter is left blank or set to false, is_analysis in the template is used to determine
	// whether to enable quick analysis.
	QuickAnalysis *bool `json:"quick_analysis,omitempty"`
}

CreateOpts is a struct that contains all the parameters.

type CustomTemplate

type CustomTemplate struct {
	// Project ID.
	ProjectId string `json:"projectId"`
	// Template name.
	Name string `json:"templateName"`
	// Structuring type. Currently, regular expression, JSON, delimiters, and Nginx are supported.
	Type string `json:"template_type"`
	// Sample log event.
	DemoLog string `json:"demoLog"`
	// Structured field.
	DemoFields []FieldFullResponse `json:"demo_fields"`
	// Keyword details.
	TagFields []FieldResponse `json:"tag_fields"`
	// Structuring method.
	Rule *RuleResponse `json:"rule"`
	// Attributes of the sample log event.
	DemoLabel string `json:"demoLabel"`
	// Template creation/update time.
	CreatedAt int64 `json:"create_time"`
	// Structuring rule ID.
	ID string `json:"id"`
}

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]CustomTemplate, error)

type Field

type Field struct {
	// Field name. A log event can be split into multiple fields with customizable names.
	Name string `json:"field_name" required:"true"`
	// Whether quick analysis is enabled.
	IsAnalysis *bool `json:"is_analysis"`
}

type FieldFullResponse

type FieldFullResponse struct {
	// Field name.
	Name string `json:"fieldName"`
	// Field content.
	Content string `json:"content"`
	// Field data type.
	Type string `json:"type"`
	// Whether parsing is enabled.
	IsAnalysis bool `json:"isAnalysis"`
	// Field sequence number.
	Index int `json:"index"`
	// Describes the hierarchical relationship between fields in a multi-level JSON file.
	Relation string `json:"relation"`
	// Custom field alias in JSON and Nginx modes.
	UserDefinedName string `json:"user_defined_name"`
}

type FieldResponse

type FieldResponse struct {
	Content      string `json:"content"`
	Name         string `json:"fieldName"`
	Index        int    `json:"index"`
	IsAnalysis   bool   `json:"isAnalysis"`
	IsLabelField bool   `json:"isLabelField"`
	IsModified   bool   `json:"isModified"`
	Type         string `json:"type"`
}

type ListOpts

type ListOpts struct {
	ID string `q:"id"`
}

type RuleResponse

type RuleResponse struct {
	// Structuring parameter.
	Param string `json:"param"`
	// Structuring type.
	Type string `json:"type"`
}

type StructuringResponse

type StructuringResponse struct {
	CustomTimeInfo struct {
		Enable bool   `json:"enable"`
		Key    string `json:"key"`
		Value  string `json:"value"`
	} `json:"custom_time_info"`
	// Structured field.
	DemoFields []FieldResponse `json:"demoFields"`
	// Keyword details.
	TagFields []FieldResponse `json:"tagFields"`
	// Sample log event.
	DemoLog string `json:"demoLog"`
	// Attributes of the sample log event.
	DemoLabel string `json:"demoLabel"`
	// Structuring rule ID.
	ID string `json:"id"`
	// Log group ID.
	LogGroupId string `json:"logGroupId"`
	// Log stream ID.
	LogStreamId string `json:"logStreamId"`
	// Project ID.
	ProjectId         string `json:"projectId"`
	SQLAnalysisEnable bool   `json:"sql_analysis_enable"`
	// Template name.
	Name string `json:"templateName"`
	// Regular expression.
	Regex string `json:"regex"`
	// Structuring method.
	Rule *RuleResponse `json:"rule"`
}

func Get

func Get(client *golangsdk.ServiceClient, logGroupId, logStreamId string) (*StructuringResponse, error)

Jump to

Keyboard shortcuts

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