Documentation ¶
Overview ¶
Code generated by goctl. DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = mon.ErrNotFound ErrInvalidObjectId = errors.New("invalid objectId") )
Functions ¶
This section is empty.
Types ¶
type HelloKv2 ¶
type HelloKv2 struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` // Fill your own fields Key string `bson:"key,omitempty" json:"key,omitempty"` Value string `bson:"value,omitempty" json:"value,omitempty"` // END: Fill your own fields UpdateAt time.Time `bson:"updateAt,omitempty" json:"updateAt,omitempty"` CreateAt time.Time `bson:"createAt,omitempty" json:"createAt,omitempty"` }
type HelloKv2Model ¶
type HelloKv2Model interface { FindAllByFilter(ctx context.Context, filter any) ([]*HelloKv2, error) FindByKey(ctx context.Context, key string) ([]*HelloKv2, error) // contains filtered or unexported methods }
HelloKv2Model is an interface to be customized, add more methods here, and implement the added methods in customHelloKv2Model.
func NewHelloKv2Model ¶
func NewHelloKv2Model(url, db, collection string) HelloKv2Model
NewHelloKv2Model returns a model for the mongo.
Click to show internal directories.
Click to hide internal directories.