generate

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

README

generate

Playground to illustrate the generation of a new mongo schema

Documentation

Overview

Code generated by goctl. DO NOT EDIT.

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 Object

type Object struct {
	ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
	// TODO: Fill your own fields
	UpdateAt time.Time `bson:"updateAt,omitempty" json:"updateAt,omitempty"`
	CreateAt time.Time `bson:"createAt,omitempty" json:"createAt,omitempty"`
}

type ObjectModel

type ObjectModel interface {
	// contains filtered or unexported methods
}

ObjectModel is an interface to be customized, add more methods here, and implement the added methods in customObjectModel.

func NewObjectModel

func NewObjectModel(url, db, collection string) ObjectModel

NewObjectModel returns a model for the mongo.

type Playground

type Playground struct {
	ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
	// TODO: Fill your own fields
	UpdateAt time.Time `bson:"updateAt,omitempty" json:"updateAt,omitempty"`
	CreateAt time.Time `bson:"createAt,omitempty" json:"createAt,omitempty"`
}

type PlaygroundModel

type PlaygroundModel interface {
	// contains filtered or unexported methods
}

PlaygroundModel is an interface to be customized, add more methods here, and implement the added methods in customPlaygroundModel.

func NewPlaygroundModel

func NewPlaygroundModel(url, db, collection string) PlaygroundModel

NewPlaygroundModel returns a model for the mongo.

Jump to

Keyboard shortcuts

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