model

package
v0.0.0-...-86bedeb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL