thesaurus

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestOpts = golangsdk.RequestOpts{
	MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"},
}

Functions

func Delete

func Delete(c *golangsdk.ServiceClient, clusterId string) *golangsdk.ErrResult

DeleteIKThesaurus

func Load

func Load(c *golangsdk.ServiceClient, clusterId string, opts LoadThesaurusReq) *golangsdk.ErrResult

LoadIKThesaurus

Types

type LoadThesaurusReq

type LoadThesaurusReq struct {
	// OBS bucket where word dictionary files are stored. The bucket must be a standard storage or infrequently
	// accessed storage and cannot be the archived storage.
	BucketName string `json:"bucketName" required:"true"`
	// Main word dictionary file object, which must be a text file encoded in UTF-8 without BOM. Each line contains
	// one sub-word. The maximum file size is 100 MB.
	MainObject string `json:"mainObject,omitempty"`
	// Stop word dictionary file object, which must be a text file encoded in UTF-8 without BOM. Each line contains
	// one sub-word. The maximum file size is 20 MB.
	StopObject string `json:"stopObject,omitempty"`
	// Synonym word dictionary file, which must be a text file encoded in UTF-8 without BOM. Each line contains one
	// group of sub-words. The maximum file size is 20 MB.
	SynonymObject string `json:"synonymObject,omitempty"`
}

LoadCustomThesaurusReq This is a auto create Body Object

type ThesaurusStatusResp

type ThesaurusStatusResp struct {
	// Loading status
	// Loaded indicates that a custom word dictionary is successfully loaded.
	// Loading indicates that a custom word dictionary is being loaded.
	// Failed indicates that a custom word dictionary fails to be loaded.
	Status        string `json:"status"`
	Bucket        string `json:"bucket"`        // OBS bucket where word dictionary files are stored.
	MainObj       string `json:"mainObj"`       // Main word dictionary file object.
	StopObj       string `json:"stopObj"`       // Stop word dictionary file object.
	SynonymObj    string `json:"synonymObj"`    // Synonym word dictionary file object.
	UpdateTime    int    `json:"updateTime"`    // Last word dictionary update time.
	UpdateDetails string `json:"updateDetails"` // Update details.
	ClusterId     string `json:"clusterId"`
	OperateStatus string `json:"operateStatus"`
	Id            string `json:"id"` // ID of a word dictionary.
}

func Get

func Get(c *golangsdk.ServiceClient, clusterId string) (*ThesaurusStatusResp, error)

Jump to

Keyboard shortcuts

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