Documentation ¶
Index ¶
- type DatabaseRepository
- type Service
- func (s *Service) CreateContent(content *entities.Content) (*entities.Content, error)
- func (s *Service) CreateEvent(event *entities.Event) (*entities.Event, error)
- func (s *Service) DeleteContent(name string) error
- func (s *Service) DeleteEvent(id entities.ID) error
- func (s *Service) GetContent(name string) (*entities.Content, error)
- func (s *Service) GetEvent(id entities.ID) (*entities.Event, error)
- func (s *Service) ListContent() ([]*entities.Content, error)
- func (s *Service) ListEvents(includePastEvents bool) ([]*entities.Event, error)
- func (s *Service) UpdateContent(content *entities.Content) (*entities.Content, error)
- func (s *Service) UpdateEvent(event *entities.Event) (*entities.Event, error)
- type Usecase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseRepository ¶
type DatabaseRepository interface { GetEvent(id entities.ID) (*entities.Event, error) ListEvents(includePastEvents bool) ([]*entities.Event, error) CreateEvent(e *entities.Event) (*entities.Event, error) UpdateEvent(e *entities.Event) (*entities.Event, error) DeleteEvent(id entities.ID) error GetContent(name string) (*entities.Content, error) ListContent() ([]*entities.Content, error) CreateContent(e *entities.Content) (*entities.Content, error) UpdateContent(e *entities.Content) (*entities.Content, error) DeleteContent(name string) error }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) CreateContent ¶
CreateContent creates a new content
func (*Service) CreateEvent ¶
CreateEvent creates a new event
func (*Service) DeleteContent ¶
DeleteContent deletes a single content by ID
func (*Service) DeleteEvent ¶
DeleteEvent deletes a single event by ID
func (*Service) GetContent ¶
GetContent fetches a single content by ID
func (*Service) ListContent ¶
ListContents fetches all contents
func (*Service) ListEvents ¶
ListEvents fetches all events
func (*Service) UpdateContent ¶
UpdateContent persists the provided content
type Usecase ¶
type Usecase interface { GetEvent(id entities.ID) (*entities.Event, error) ListEvents(includePastEvents bool) ([]*entities.Event, error) CreateEvent(e *entities.Event) (*entities.Event, error) UpdateEvent(e *entities.Event) (*entities.Event, error) DeleteEvent(id entities.ID) error GetContent(name string) (*entities.Content, error) ListContent() ([]*entities.Content, error) CreateContent(e *entities.Content) (*entities.Content, error) UpdateContent(e *entities.Content) (*entities.Content, error) DeleteContent(name string) error }
Click to show internal directories.
Click to hide internal directories.