storage

package
v0.0.0-...-00872a6 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 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 Activities

type Activities []Activity

Activities a list of activities

type Activity

type Activity struct {
	ID     string
	Period Interval
	Order  Order
	Type   ActivityType
}

Activity an user activity

type ActivityType

type ActivityType struct {
	ID   string
	Code int
	Name string
}

ActivityType the activity type

type Interval

type Interval struct {
	From time.Time
	To   time.Time
}

Interval an interval between two dates

type Order

type Order struct {
	ID   string
	Name string
}

Order order

type Report

type Report struct {
	ID          string
	Description string
	Code        string
	Name        string
	Activities  Activities
	Period      Interval
}

Report report model for storage

type Reports

type Reports []Report

Reports list of reports

type Repository

type Repository interface {
	Create(context.Context, Report) (*uuid.UUID, error)
	Read(context.Context, uuid.UUID) (*Report, error)
	Update(context.Context, Report) error
	Delete(context.Context, uuid.UUID) error
	List(context.Context) (Reports, error)
}

Repository Repository interface

func NewInMemoryStore

func NewInMemoryStore() Repository

NewInMemoryStore in memory repository for reports

Jump to

Keyboard shortcuts

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