repository

package
v0.0.0-...-3ab59f4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category interface {
	Save(category CategoryEntity) (CategoryId, error)
	FindAll() ([]CategoryEntity, error)
	Delete(id CategoryId) error
}

type CategoryEntity

type CategoryEntity struct {
	Id       CategoryId
	Name     string
	CreateAt time.Time
	UpdateAt *time.Time
}

type CategoryId

type CategoryId string

func (CategoryId) String

func (c CategoryId) String() string

type CategoryRepo

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

func NewCategory

func NewCategory(db database.DbConnection) CategoryRepo

func (CategoryRepo) Delete

func (ca CategoryRepo) Delete(id CategoryId) error

func (CategoryRepo) FindAll

func (ca CategoryRepo) FindAll() ([]CategoryEntity, error)

func (CategoryRepo) Save

func (ca CategoryRepo) Save(category CategoryEntity) (CategoryId, error)

type Rider

type Rider interface {
	Save(rider RiderEntity) (string, error)
	FindOne(id string) (RiderEntity, error)
	Delete(id string) error
	FindAll(page server.PageRequest) ([]RiderEntity, error)
	Count() (int, error)
}

type RiderEntity

type RiderEntity struct {
	Id               string     `json:"id"`
	Name             string     `json:"name"`
	Age              int        `json:"age"`
	Gender           string     `json:"gender"`
	City             string     `json:"city"`
	Email            string     `json:"email"`
	PaidSubscription bool       `json:"paidSubscription"`
	Sponsors         string     `json:"sponsors"`
	CategoryId       string     `json:"categoryId"`
	CreateAt         time.Time  `json:"createAt"`
	UpdateAt         *time.Time `json:"updateAt,omitempty"`
}

type RiderRepo

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

func NewRiderRepository

func NewRiderRepository(d database.DbConnection) RiderRepo

func (RiderRepo) Count

func (r RiderRepo) Count() (int, error)

func (RiderRepo) Delete

func (r RiderRepo) Delete(id string) error

func (RiderRepo) FindAll

func (r RiderRepo) FindAll(page server.PageRequest) ([]RiderEntity, error)

func (RiderRepo) FindOne

func (r RiderRepo) FindOne(id string) (RiderEntity, error)

func (RiderRepo) Save

func (r RiderRepo) Save(rider RiderEntity) (string, error)

type Score

type Score interface {
	Save(score ScoreEntity) (string, error)
}

type ScoreEntity

type ScoreEntity struct {
	Id        string     `json:"id"`
	RiderId   string     `json:"riderId"`
	Score     float32    `json:"score"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}

type ScoreRepo

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

func NewScoreRepository

func NewScoreRepository(d database.DbConnection) ScoreRepo

func (ScoreRepo) Save

func (s ScoreRepo) Save(score ScoreEntity) (string, error)

Jump to

Keyboard shortcuts

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