scores

package
v0.0.0-...-c4f498c Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Point

type Point struct {
	ID        int       `json:"id"`
	Name      string    `json:"name"`
	Count     int       `json:"count"`
	ScoreID   int       `json:"score_id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

Point component for score.

type Score

type Score struct {
	ID         int       `json:"id"`
	TotalPoint int       `json:"total_point"`
	CreatedAt  time.Time `json:"created_at"`
	UpdatedAt  time.Time `json:"updated_at"`
}

Score stores total points.

type Service

type Service interface {
	Earn(ctx context.Context, name string, count int) error
}

Service instance for todo's domain. Any operation done to any of object within this domain should use this service.

func New

func New(repository rel.Repository) Service

New Scores service.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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