services

package
v0.1.0-alpha.17 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskService

type TaskService interface {
	GetAll() ([]*models.Task, error)
	Create(name string) (*models.Task, error)
}

type TaskServiceInMemory

type TaskServiceInMemory struct {
	Counter uint
	Tasks   []*models.Task
}

func (*TaskServiceInMemory) Create

func (s *TaskServiceInMemory) Create(name string) (*models.Task, error)

func (TaskServiceInMemory) GetAll

func (s TaskServiceInMemory) GetAll() ([]*models.Task, error)

type TaskServiceSql

type TaskServiceSql struct {
	Sqlx *sqlx.DB
}

func (TaskServiceSql) Create

func (s TaskServiceSql) Create(name string) (*models.Task, error)

func (TaskServiceSql) GetAll

func (s TaskServiceSql) GetAll() ([]*models.Task, error)

Jump to

Keyboard shortcuts

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