Documentation ¶ Index ¶ type Model func NewModel(db *md.Database) Model func (m Model) FindMany(ctx context.Context, vals []Upsert) (ids []primitive.ObjectID, err error) func (m Model) GetByIDs(ctx context.Context, ids []primitive.ObjectID) (res []Okved, err error) func (m Model) GetBySlug(ctx context.Context, slug string) (res Okved, err error) type Okved type Upsert Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Model ¶ type Model struct { // contains filtered or unexported fields } func NewModel ¶ func NewModel(db *md.Database) Model func (Model) FindMany ¶ func (m Model) FindMany( ctx context.Context, vals []Upsert, ) ( ids []primitive.ObjectID, err error, ) func (Model) GetByIDs ¶ func (m Model) GetByIDs(ctx context.Context, ids []primitive.ObjectID) (res []Okved, err error) func (Model) GetBySlug ¶ func (m Model) GetBySlug(ctx context.Context, slug string) (res Okved, err error) type Okved ¶ type Okved struct { ID primitive.ObjectID `bson:"_id,omitempty"` Slug string `bson:"s,omitempty"` Code string `bson:"c,omitempty"` Name string `bson:"n,omitempty"` CodeWithName string `bson:"cn,omitempty"` Kind kind `bson:"k,omitempty"` } type Upsert ¶ type Upsert struct { Code string Name string Kind string } Source Files ¶ View all Source files model.go model_find_many.go model_get_by_ids.go model_get_by_slug.go new_model.go okved.go Click to show internal directories. Click to hide internal directories.