Documentation ¶
Index ¶
- Constants
- type Item
- type Service
- func (s *Service) Del(ctx context.Context, key string) (err error)
- func (s *Service) Get(ctx context.Context, key string) Item
- func (s *Service) Gets(ctx context.Context, key string) (items []Item, err error)
- func (s *Service) Init(ctx context.Context) error
- func (s *Service) ReadConfig(ctx context.Context, key, name string, opt interface{}) error
- func (s *Service) Set(ctx context.Context, name, key, val, format string) Item
- func (s *Service) SetObject(ctx context.Context, name, key, format string, v interface{}) Item
Constants ¶
View Source
const ( JSON = "json" TOML = "toml" YAML = "yaml" STRING = "string" INT = "int" BOOL = "bool" FLOAT = "float" TIME = "time" DURATION = "duration" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { ID uint64 `gorm:"comment:编号"` Name string `gorm:"not null;size:32;comment:名;"` Key string `gorm:"not null;size:32;uniqueIndex:kver;comment:键;"` Ver uint `gorm:"not null;uniqueIndex:kver;commit:版本"` Val string `gorm:"not null;size:1024;comment:值;"` Format string `gorm:"not null;size:32;comment:格式,枚举,string,int,bool,float,duration,time,json,toml,yaml;"` CreatedAt int64 `gorm:"comment:创建时间;"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.