dao

package
v0.0.0-...-37307a8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TrailheadsDAO

type TrailheadsDAO struct {
	// contains filtered or unexported fields
}

func NewTrailheadsDAO

func NewTrailheadsDAO(m *mongo.Client) *TrailheadsDAO

func (TrailheadsDAO) CreateTrailhead

func (td TrailheadsDAO) CreateTrailhead(ctx context.Context, trailhead *trailheads.Trailhead) error

func (TrailheadsDAO) DeleteTrailhead

func (td TrailheadsDAO) DeleteTrailhead(ctx context.Context, name string) error

func (TrailheadsDAO) GetTrailhead

func (td TrailheadsDAO) GetTrailhead(ctx context.Context, name string) (*trailheads.Trailhead, error)

func (TrailheadsDAO) GetTrailheads

func (td TrailheadsDAO) GetTrailheads(ctx context.Context) ([]trailheads.Trailhead, error)

func (TrailheadsDAO) UpdateTrailhead

func (td TrailheadsDAO) UpdateTrailhead(ctx context.Context, trailhead *trailheads.Trailhead) error

type UsersDAO

type UsersDAO struct {
	// contains filtered or unexported fields
}

func NewUsersDAO

func NewUsersDAO(m *mongo.Client) *UsersDAO

func (UsersDAO) CreateUser

func (ud UsersDAO) CreateUser(ctx context.Context, user *structs.User) error

func (UsersDAO) DeleteUser

func (ud UsersDAO) DeleteUser(ctx context.Context, username string) error

func (UsersDAO) GetUser

func (ud UsersDAO) GetUser(ctx context.Context, username string) (*structs.User, error)

func (UsersDAO) UpdateUser

func (ud UsersDAO) UpdateUser(ctx context.Context, user *structs.User) error

Jump to

Keyboard shortcuts

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