Documentation ¶
Index ¶
- type Entity
- type Env
- func (e *Env) Client() *mongo.Client
- func (e *Env) Close(ctx context.Context) error
- func (e *Env) Collection(database, collection string) *mongo.Collection
- func (e *Env) Context() context.Context
- func (e *Env) Database(name string) *mongo.Database
- func (e *Env) Open(ctx context.Context, connectionString string) error
- func (e *Env) Ping() error
- type User
- type UserEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct { ID string `json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt sql.NullTime `json:"deleted_at"` }
Entity contains the basic fields for database entities
type Env ¶
type Env struct {
// contains filtered or unexported fields
}
func (*Env) Collection ¶
func (e *Env) Collection(database, collection string) *mongo.Collection
type UserEntity ¶
UserEntity is the user entity for the database
Click to show internal directories.
Click to hide internal directories.