Documentation ¶
Index ¶
- type BodyParser
- type ChannelGroupService
- func (c ChannelGroupService) Create(channelGroup model.ChannelGroup) (model.ChannelGroup, exception.HttpError)
- func (c ChannelGroupService) Delete(id string) exception.HttpError
- func (c ChannelGroupService) GetAll() []model.ChannelGroup
- func (c ChannelGroupService) GetOne(id string) (model.ChannelGroup, exception.HttpError)
- func (c ChannelGroupService) Update(id string, channelGroup model.ChannelGroup) exception.HttpError
- type ChannelService
- func (c ChannelService) Create(channel model.Channel) (model.Channel, exception.HttpError)
- func (c ChannelService) Delete(id string) exception.HttpError
- func (c ChannelService) GetAll() []model.Channel
- func (c ChannelService) GetOne(id string) (model.Channel, exception.HttpError)
- func (c ChannelService) Update(id string, channel model.Channel) exception.HttpError
- type MessageService
- func (m MessageService) Create(message model.Message) (model.Message, exception.HttpError)
- func (m MessageService) Delete(id string) exception.HttpError
- func (m MessageService) GetAll() []model.Message
- func (m MessageService) GetOne(id string) (model.Message, exception.HttpError)
- func (m MessageService) Update(id string, message model.Message) exception.HttpError
- type ServerService
- func (s ServerService) Create(server model.Server) (model.Server, exception.HttpError)
- func (s ServerService) Delete(id string) exception.HttpError
- func (s ServerService) GetAll() []model.Server
- func (s ServerService) GetAllGroupChannels(id string) ([]model.ChannelGroup, exception.HttpError)
- func (s ServerService) GetOne(id string) (model.Server, exception.HttpError)
- func (s ServerService) Update(id string, server model.Server) exception.HttpError
- type Service
- type UserService
- func (u UserService) Create(user model.User) (model.User, exception.HttpError)
- func (u UserService) Delete(id string) exception.HttpError
- func (u UserService) GetAll() []model.User
- func (u UserService) GetOne(id string) (model.User, exception.HttpError)
- func (u UserService) Login(user model.User) (string, exception.HttpError)
- func (u UserService) Update(id string, user model.User) exception.HttpError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BodyParser ¶
type BodyParser func(out interface{}) error
BodyParser a fiber BodyParser abstraction
type ChannelGroupService ¶
type ChannelGroupService struct { }
ChannelGroupService channel group service class
func (ChannelGroupService) Create ¶
func (c ChannelGroupService) Create(channelGroup model.ChannelGroup) (model.ChannelGroup, exception.HttpError)
Create create a channel group
func (ChannelGroupService) Delete ¶
func (c ChannelGroupService) Delete(id string) exception.HttpError
Delete delete a channel group by id
func (ChannelGroupService) GetAll ¶
func (c ChannelGroupService) GetAll() []model.ChannelGroup
GetAll find all channel groups
func (ChannelGroupService) GetOne ¶
func (c ChannelGroupService) GetOne(id string) (model.ChannelGroup, exception.HttpError)
GetOne find a channel group by id
func (ChannelGroupService) Update ¶
func (c ChannelGroupService) Update(id string, channelGroup model.ChannelGroup) exception.HttpError
Update update a channel group by id
type ChannelService ¶
type ChannelService struct { }
ChannelService channel services class
func (ChannelService) Delete ¶
func (c ChannelService) Delete(id string) exception.HttpError
Delete delete a server by id
func (ChannelService) GetAll ¶
func (c ChannelService) GetAll() []model.Channel
GetAll find all registered users
type MessageService ¶
type MessageService struct { }
MessageService message service class
func (MessageService) Delete ¶
func (m MessageService) Delete(id string) exception.HttpError
Delete delete a message by id
func (MessageService) GetAll ¶
func (m MessageService) GetAll() []model.Message
GetAll find all registered messages
type ServerService ¶
type ServerService struct { }
ServerService server services class
func (ServerService) Delete ¶
func (s ServerService) Delete(id string) exception.HttpError
Delete delete a server by id
func (ServerService) GetAll ¶
func (s ServerService) GetAll() []model.Server
GetAll find all registered users
func (ServerService) GetAllGroupChannels ¶
func (s ServerService) GetAllGroupChannels(id string) ([]model.ChannelGroup, exception.HttpError)
GetAllGroupChannels find all channels by server id
type Service ¶
type Service interface { FindAll() []interface{} FindById(stringId string) (interface{}, exception.HttpError) Create(bodyParser BodyParser) exception.HttpError Delete(stringId string) exception.HttpError Update(stringId string, bodyParser BodyParser) (interface{}, exception.HttpError) }
Service service interface example
type UserService ¶
type UserService struct { }
UserService channel group service class
func (UserService) Delete ¶
func (u UserService) Delete(id string) exception.HttpError
Delete delete a channel group by id
func (UserService) GetAll ¶
func (u UserService) GetAll() []model.User
GetAll find all registered channel groups