app

package
v0.0.0-...-18df7f0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Todo

type Todo struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	CreateAt    int64  `json:"created_at"`
}

type TodoRepository

type TodoRepository interface {
	Create(todo *Todo) (*Todo, error)
	Read(id string) (*Todo, error)
	ReadAll() (*[]Todo, error)
	Update(todo *Todo) (*Todo, error)
	Delete(id string) error
}

type TodoSerializer

type TodoSerializer interface {
	Decode(input []byte) (*Todo, error)
	Encode(input *Todo) ([]byte, error)
}

type TodoService

type TodoService interface {
	Create(todo *Todo) (*Todo, error)
	Read(id string) (*Todo, error)
	ReadAll() (*[]Todo, error)
	Update(todo *Todo) (*Todo, error)
	Delete(id string) error
}

type User

type User struct {
	ID        string `json:"id"`
	FirstName string `json:"firstname"`
	LastName  string `json:"lastname"`
	Email     string `json:"email"`
	Password  string `json:"password"`
	Avater    string `json:"avater"`
	Todo      []Todo
}

type UserRepository

type UserRepository interface {
	Create(user *User) (*User, error)
	Read(id string) (*User, error)
	ReadAll() (*[]User, error)
	Update(user *User) (*User, error)
	Delete(id string) error
}

type UserService

type UserService interface {
	Create(user *User) (*User, error)
	Read(id string) (*User, error)
	ReadAll() (*[]User, error)
	Update(user *User) (*User, error)
	Delete(id string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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