12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package store
- import (
- "encoding/json"
- "jjl-tools/tinodeService/store/types"
- )
- var uGen types.UidGenerator
- type configType struct {
-
- UidKey []byte `json:"uid_key"`
-
- MaxResults int `json:"max_results"`
-
- Adapters map[string]json.RawMessage `json:"adapters"`
- }
- func GetUid() types.Uid {
- return uGen.Get()
- }
- func GetUidString() string {
- return uGen.GetStr()
- }
- func DecodeUid(uid types.Uid) int64 {
- if uid.IsZero() {
- return 0
- }
- return uGen.DecodeUid(uid)
- }
- func EncodeUid(id int64) types.Uid {
- if id == 0 {
- return types.ZeroUid
- }
- return uGen.EncodeInt64(id)
- }
- type UsersObjMapper struct{}
- var Users UsersObjMapper
|