boards

package
v0.0.0-...-dfd90ba Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateParams

type CreateParams struct {
	Name        string
	Description string
	Privacy     string
	UserId      int
}

type FullUpdateParams

type FullUpdateParams struct {
	Id          int
	Name        string
	Description string
	Privacy     string
}

type PartialUpdateParams

type PartialUpdateParams struct {
	Id                int
	Name              string
	UpdateName        bool
	Description       string
	UpdateDescription bool
	Privacy           string
	UpdatePrivacy     bool
}

type Repository

type Repository interface {
	Create(params *CreateParams) (models.Board, error)
	List(userId int) ([]models.Board, error)
	Get(id int) (models.Board, error)
	FullUpdate(params *FullUpdateParams) (models.Board, error)
	PartialUpdate(params *PartialUpdateParams) (models.Board, error)
	Delete(id int) error

	AddPin(boardId, pinId int) error
	PinsList(boardId int, page, limit int) ([]models.Pin, error)
	RemovePin(boardId, pinId int) error
	HasPin(boardId, pinId int) (bool, error)

	CheckWriteAccess(userId, boardId string) (bool, error)
	CheckReadAccess(userId, boardId string) (bool, error)
}

type Service

type Service interface {
	Create(params *CreateParams) (models.Board, error)
	List(userId int) ([]models.Board, error)
	Get(id int) (models.Board, error)
	FullUpdate(params *FullUpdateParams) (models.Board, error)
	PartialUpdate(params *PartialUpdateParams) (models.Board, error)
	Delete(id int) error

	AddPin(boardId, pinId int) error
	PinsList(userId, boardId int, page, limit int) ([]models.Pin, error)
	RemovePin(boardId, pinId int) error

	CheckWriteAccess(userId, boardId string) (bool, error)
	CheckReadAccess(userId, boardId string) (bool, error)
}

Directories

Path Synopsis
delivery
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
repository

Jump to

Keyboard shortcuts

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