Documentation
¶
Index ¶
- func Create(client *golangsdk.ServiceClient, opts CreateOpts) error
- func Delete(client *golangsdk.ServiceClient, id string) (err error)
- func Update(client *golangsdk.ServiceClient, opts CreateOpts) error
- type BriefCustomTemplate
- type ClusterResponse
- type CreateOpts
- type CustomTemplate
- type Field
- type FieldFullResponse
- type FieldResponse
- type ListOpts
- type RuleResponse
- type StructuringResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) error
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 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 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 RuleResponse ¶
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)
Click to show internal directories.
Click to hide internal directories.