model

package
v0.0.0-...-30229d2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultGroupEpoch = 0
View Source
const DefaultGroupId = "TODO"
View Source
const DefaultWorkspaceEpoch = 0
View Source
const SharedWorkspaceId = "public"

Variables

This section is empty.

Functions

func SplitGroupId

func SplitGroupId(id string) (string, string)

Types

type CreateTodosParams

type CreateTodosParams struct {
	GroupId string
	Title   string
	Details *string
}

type DeleteTodosParams

type DeleteTodosParams struct {
	Epoch    *int
	Revision *int
}

type EntityReference

type EntityReference struct {
	Id    string
	Epoch int64
}

type ErrBadRequest

type ErrBadRequest string

func (ErrBadRequest) Error

func (e ErrBadRequest) Error() string

type ErrNotFound

type ErrNotFound string

func (ErrNotFound) Error

func (e ErrNotFound) Error() string

type ListTodosPage

type ListTodosPage struct {
	Items          []Todo
	RemainingItems int
	NextPageToken  *string
}

type ListTodosParams

type ListTodosParams struct {
	ByGroup   []string
	ByStatus  []string
	PageToken *string
	PageSize  *int
}

type Modelling

type Modelling interface {
	HealthZ(ctx context.Context) error

	GetTodo(ctx context.Context, workspaceId string, id string) (*Todo, error)
	ListTodos(ctx context.Context, workspaceId string, params ListTodosParams) (*ListTodosPage, error)
	CreateTodo(ctx context.Context, workspaceId string, params CreateTodosParams) (*Todo, error)
	DeleteTodo(ctx context.Context, workspaceId string, id string, params DeleteTodosParams) error
	Close(ctx context.Context) error
}

type Todo

type Todo struct {
	Id         int64
	Epoch      int64
	EpochAt    time.Time
	Revision   int64
	RevisionAt time.Time
	Workspace  EntityReference
	Group      EntityReference

	Title   string
	Status  string
	Details *string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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