Documentation ¶
Index ¶
- Constants
- Variables
- func DeleteHook(clientID string, id string) error
- func DeleteModel1(id int32, shardKey int32) error
- func DeleteModel2(id int64, shardKey int32, p1 string) error
- func SaveHook(m *Hook) error
- func SaveHookWithTxn(txn *badger.Txn, alloc *kv.Allocator, m *Hook) error
- func SaveModel1(m *Model1) error
- func SaveModel1WithTxn(txn *badger.Txn, alloc *kv.Allocator, m *Model1) error
- func SaveModel2(m *Model2) error
- func SaveModel2WithTxn(txn *badger.Txn, alloc *kv.Allocator, m *Model2) error
- type Hook
- func (x *Hook) DeepCopy(z *Hook)
- func (*Hook) Descriptor() ([]byte, []int)deprecated
- func (x *Hook) GetClientID() string
- func (x *Hook) GetFired() bool
- func (x *Hook) GetHookUrl() string
- func (x *Hook) GetID() string
- func (x *Hook) GetSuccess() bool
- func (x *Hook) GetTimestamp() string
- func (x *Hook) Marshal() ([]byte, error)
- func (*Hook) ProtoMessage()
- func (x *Hook) ProtoReflect() protoreflect.Message
- func (x *Hook) PushToContext(ctx *edge.RequestCtx)
- func (x *Hook) Reset()
- func (x *Hook) String() string
- func (x *Hook) Unmarshal(b []byte) error
- type Model1
- func ListModel1(offsetID int32, offset int32, limit int32, cond func(m *Model1) bool) ([]*Model1, error)
- func ReadModel1(id int32, shardKey int32, m *Model1) (*Model1, error)
- func ReadModel1ByShardKeyAndID(shardKey int32, id int32, m *Model1) (*Model1, error)
- func ReadModel1ByShardKeyAndIDWithTxn(txn *badger.Txn, alloc *kv.Allocator, shardKey int32, id int32, m *Model1) (*Model1, error)
- func ReadModel1WithTxn(txn *badger.Txn, alloc *kv.Allocator, id int32, shardKey int32, m *Model1) (*Model1, error)
- func (x *Model1) DeepCopy(z *Model1)
- func (*Model1) Descriptor() ([]byte, []int)deprecated
- func (x *Model1) GetID() int32
- func (x *Model1) GetP1() string
- func (x *Model1) GetP2() []string
- func (x *Model1) GetP5() uint64
- func (x *Model1) GetShardKey() int32
- func (x *Model1) HasP2(xx string) bool
- func (x *Model1) Marshal() ([]byte, error)
- func (*Model1) ProtoMessage()
- func (x *Model1) ProtoReflect() protoreflect.Message
- func (x *Model1) PushToContext(ctx *edge.RequestCtx)
- func (x *Model1) Reset()
- func (x *Model1) String() string
- func (x *Model1) Unmarshal(b []byte) error
- type Model2
- func ListModel2(offsetID int64, offsetShardKey int32, offset int32, limit int32, ...) ([]*Model2, error)
- func ReadModel2(id int64, shardKey int32, p1 string, m *Model2) (*Model2, error)
- func ReadModel2ByP1AndShardKeyAndID(p1 string, shardKey int32, id int64, m *Model2) (*Model2, error)
- func ReadModel2ByP1AndShardKeyAndIDWithTxn(txn *badger.Txn, alloc *kv.Allocator, p1 string, shardKey int32, id int64, ...) (*Model2, error)
- func ReadModel2WithTxn(txn *badger.Txn, alloc *kv.Allocator, id int64, shardKey int32, p1 string, ...) (*Model2, error)
- func (x *Model2) DeepCopy(z *Model2)
- func (*Model2) Descriptor() ([]byte, []int)deprecated
- func (x *Model2) GetID() int64
- func (x *Model2) GetP1() string
- func (x *Model2) GetP2() []string
- func (x *Model2) GetP5() uint64
- func (x *Model2) GetShardKey() int32
- func (x *Model2) HasP2(xx string) bool
- func (x *Model2) Marshal() ([]byte, error)
- func (*Model2) ProtoMessage()
- func (x *Model2) ProtoReflect() protoreflect.Message
- func (x *Model2) PushToContext(ctx *edge.RequestCtx)
- func (x *Model2) Reset()
- func (x *Model2) String() string
- func (x *Model2) Unmarshal(b []byte) error
Constants ¶
View Source
const C_Hook int64 = 74116203
View Source
const C_Model1 int64 = 2074613123
View Source
const C_Model2 int64 = 3802219577
Variables ¶
View Source
var File_model_proto protoreflect.FileDescriptor
View Source
var PoolHook = poolHook{}
View Source
var PoolModel1 = poolModel1{}
View Source
var PoolModel2 = poolModel2{}
Functions ¶
func DeleteHook ¶
func DeleteModel1 ¶
func SaveHookWithTxn ¶ added in v0.3.8
func SaveModel1 ¶
func SaveModel1WithTxn ¶ added in v0.3.8
func SaveModel2 ¶
Types ¶
type Hook ¶
type Hook struct { ClientID string `protobuf:"bytes,1,opt,name=ClientID,proto3" json:"ClientID,omitempty"` ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"` Timestamp string `protobuf:"bytes,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` // UTC unix epoch time HookUrl string `protobuf:"bytes,4,opt,name=HookUrl,proto3" json:"HookUrl,omitempty"` Fired bool `protobuf:"varint,5,opt,name=Fired,proto3" json:"Fired,omitempty"` Success bool `protobuf:"varint,6,opt,name=Success,proto3" json:"Success,omitempty"` // contains filtered or unexported fields }
func ReadHookWithTxn ¶ added in v0.3.8
func (*Hook) Descriptor
deprecated
func (*Hook) GetClientID ¶
func (*Hook) GetHookUrl ¶
func (*Hook) GetSuccess ¶
func (*Hook) GetTimestamp ¶
func (*Hook) ProtoMessage ¶
func (*Hook) ProtoMessage()
func (*Hook) ProtoReflect ¶
func (x *Hook) ProtoReflect() protoreflect.Message
func (*Hook) PushToContext ¶
func (x *Hook) PushToContext(ctx *edge.RequestCtx)
type Model1 ¶
type Model1 struct { ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` ShardKey int32 `protobuf:"varint,2,opt,name=ShardKey,proto3" json:"ShardKey,omitempty"` P1 string `protobuf:"bytes,3,opt,name=P1,proto3" json:"P1,omitempty"` P2 []string `protobuf:"bytes,4,rep,name=P2,proto3" json:"P2,omitempty"` P5 uint64 `protobuf:"varint,5,opt,name=P5,proto3" json:"P5,omitempty"` // contains filtered or unexported fields }
func ListModel1 ¶ added in v0.3.6
func ReadModel1ByShardKeyAndIDWithTxn ¶ added in v0.3.8
func ReadModel1WithTxn ¶ added in v0.3.8
func (*Model1) Descriptor
deprecated
func (*Model1) GetShardKey ¶
func (*Model1) ProtoMessage ¶
func (*Model1) ProtoMessage()
func (*Model1) ProtoReflect ¶
func (x *Model1) ProtoReflect() protoreflect.Message
func (*Model1) PushToContext ¶
func (x *Model1) PushToContext(ctx *edge.RequestCtx)
type Model2 ¶
type Model2 struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` ShardKey int32 `protobuf:"varint,2,opt,name=ShardKey,proto3" json:"ShardKey,omitempty"` P1 string `protobuf:"bytes,3,opt,name=P1,proto3" json:"P1,omitempty"` P2 []string `protobuf:"bytes,4,rep,name=P2,proto3" json:"P2,omitempty"` P5 uint64 `protobuf:"varint,5,opt,name=P5,proto3" json:"P5,omitempty"` // contains filtered or unexported fields }
func ListModel2 ¶ added in v0.3.6
func ReadModel2ByP1AndShardKeyAndIDWithTxn ¶ added in v0.3.8
func ReadModel2WithTxn ¶ added in v0.3.8
func (*Model2) Descriptor
deprecated
func (*Model2) GetShardKey ¶
func (*Model2) ProtoMessage ¶
func (*Model2) ProtoMessage()
func (*Model2) ProtoReflect ¶
func (x *Model2) ProtoReflect() protoreflect.Message
func (*Model2) PushToContext ¶
func (x *Model2) PushToContext(ctx *edge.RequestCtx)
Click to show internal directories.
Click to hide internal directories.