Movatterモバイル変換


[0]ホーム

URL:


Notice  The highest tagged major version isv2.

simple

package
v1.17.3Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License:MITImports:5Imported by:0

Details

Repository

github.com/sv-tools/mongoifc

Links

Documentation

Index

Constants

View Source
const (UsersCollection = "users")

Variables

This section is empty.

Functions

funcCollectionExistsadded inv1.11.2

func CollectionExists(ctxcontext.Context, dbmongoifc.Database, namestring) (bool,error)

funcCreateadded inv1.11.2

func Create(ctxcontext.Context, dbmongoifc.Database, users ...User) ([]string,error)

funcCreateCollectionadded inv1.11.2

func CreateCollection(ctxcontext.Context, dbmongoifc.Database, namestring)error

funcDeleteadded inv1.11.2

func Delete(ctxcontext.Context, dbmongoifc.Database, ids ...string)error

funcDropCollectionadded inv1.11.2

func DropCollection(ctxcontext.Context, dbmongoifc.Database, namestring)error

Types

typeUser

type User struct {IDstring `json:"id,omitempty" bson:"_id,omitempty"`Namestring `json:"name,omitempty" bson:"name,omitempty"`Emailstring `json:"email,omitempty" bson:"email,omitempty"`Activebool   `json:"active,omitempty" bson:"active,omitempty"`IsAdminbool   `json:"is_admin,omitempty" bson:"is_admin,omitempty"`}

funcGetAdmins

func GetAdmins(ctxcontext.Context, dbmongoifc.Database) ([]User,error)

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp