Skip to content

Commit

Permalink
Merge pull request #13 from tornado-ssy/main
Browse files Browse the repository at this point in the history
增加优先级字段
  • Loading branch information
little-cui authored Sep 16, 2023
2 parents 42f1882 + a48f845 commit b768996
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.48.0
version: v1.51.2
args: --skip-dirs=examples,test --skip-files=.*_test.go$
10 changes: 6 additions & 4 deletions struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,37 @@

package kie

//KVRequest is http request body
// KVRequest is http request body
type KVRequest struct {
ID string `json:"id" yaml:"id"`
Key string `json:"key" yaml:"key"`
Value string `json:"value,omitempty" yaml:"value,omitempty"`
Status string `json:"status,omitempty" yaml:"status,omitempty"`
ValueType string `json:"value_type,omitempty" bson:"value_type,omitempty" yaml:"value_type,omitempty"` //ini,json,text,yaml,properties
Priority int `json:"priority,omitempty" yaml:"priority,omitempty"` //the smaller value,the higher priority
Checker string `json:"check,omitempty" yaml:"check,omitempty"` //python script
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` //redundant
}

//KVResponse represents the key value list
// KVResponse represents the key value list
type KVResponse struct {
LabelDoc *LabelDocResponse `json:"label,omitempty"`
Total int `json:"total,omitempty"`
Data []*KVDoc `json:"data,omitempty"`
}

//LabelDocResponse is label struct
// LabelDocResponse is label struct
type LabelDocResponse struct {
Labels map[string]string `json:"labels,omitempty"`
}

//KVDoc is database struct to store kv
// KVDoc is database struct to store kv
type KVDoc struct {
ID string `json:"id,omitempty" bson:"id,omitempty" yaml:"id,omitempty" swag:"string"`
Key string `json:"key" yaml:"key"`
Value string `json:"value,omitempty" yaml:"value,omitempty"`
ValueType string `json:"value_type,omitempty" bson:"value_type,omitempty" yaml:"value_type,omitempty"` //ini,json,text,yaml,properties
Priority int `json:"priority,omitempty" yaml:"priority,omitempty"` //the smaller value,the higher priority
Checker string `json:"check,omitempty" yaml:"check,omitempty"` //python script
CreateRevision int64 `json:"create_revision,omitempty" bson:"create_revision," yaml:"create_revision,omitempty"`
UpdateRevision int64 `json:"update_revision,omitempty" bson:"update_revision," yaml:"update_revision,omitempty"`
Expand Down

0 comments on commit b768996

Please sign in to comment.