Documentation ¶
Index ¶
- func CreateChannel(c *fiber.Ctx) error
- func CreateStrategy(c *fiber.Ctx) error
- func CreateUser(c *fiber.Ctx) error
- func DeleteChannel(c *fiber.Ctx) error
- func DeleteStrategy(c *fiber.Ctx) error
- func DeleteUser(c *fiber.Ctx) error
- func GetChannel(c *fiber.Ctx) error
- func GetChannels(c *fiber.Ctx) error
- func GetStrategies(c *fiber.Ctx) error
- func GetStrategy(c *fiber.Ctx) error
- func GetUser(c *fiber.Ctx) error
- func TriggerWebhook(c *fiber.Ctx) error
- func UpdateChannel(c *fiber.Ctx) error
- func UpdateUser(c *fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChannel ¶
func CreateChannel(c *fiber.Ctx) error
@Summary Create a channel @Description Create a new channel @Security BasicAuth @Tags channels @Accept json @Produce json @Param channel body types.AddChannel true "Channel to create" @Success 200 {object} types.Channel @Failure 401 {string} string @Failure 409 {object} utils.HTTPError @Router /channels [post]
func CreateStrategy ¶
func CreateStrategy(c *fiber.Ctx) error
@Summary Create a new strategy @Description Create a new strategy for the current user @Security BasicAuth @Tags strategies @Accept json @Produce json @Param user body types.AddStrategy true "Strategy to create" @Param channel_id path int true "Channel ID" @Success 200 {object} types.Strategy @Failure 400 {object} utils.HTTPError @Failure 401 {string} string @Router /channels/{channel_id}/strategies [post]
func CreateUser ¶
func CreateUser(c *fiber.Ctx) error
@Summary Create a user @Description Create a new user @Tags users @Accept json @Produce json @Param user body types.AddUser true "User to create" @Success 200 {object} types.GetUser @Failure 401 {string} string @Failure 409 {object} utils.HTTPError @Failure 501 {object} utils.HTTPError "if user registration is disabled on the server" @Router /users [post]
func DeleteChannel ¶
func DeleteChannel(c *fiber.Ctx) error
@Summary Delete a channel @Description Delete a channel and all related strategies @Security BasicAuth @Tags channels @Accept json @Produce json @Success 204 {string} string @Failure 401 {string} string @Failure 404 {object} utils.HTTPError @Param channel_id path int true "Channel ID" @Router /channels/{channel_id} [delete]
func DeleteStrategy ¶
func DeleteStrategy(c *fiber.Ctx) error
@Summary Delete a strategy @Description Delete a strategy for a particular symbol @Security BasicAuth @Tags strategies @Accept json @Produce json @Success 204 {string} string @Failure 401 {string} string @Failure 404 {object} utils.HTTPError @Param channel_id path int true "Channel ID" @Param strategy_symbol path string true "Strategy Symbol, use 'all' for the default strategy" @Router /channels/{channel_id}/strategies/{strategy_symbol} [delete]
func DeleteUser ¶
func DeleteUser(c *fiber.Ctx) error
@Summary Delete the current user @Description Delete the current user @Security BasicAuth @Tags users @Accept json @Produce json @Success 204 {string} string @Failure 400 {object} utils.HTTPError @Failure 401 {string} string @Router /users [delete]
func GetChannel ¶
func GetChannel(c *fiber.Ctx) error
@Summary Get a spectific channel @Description Get a spectific channel @Security BasicAuth @Tags channels @Accept json @Produce json @Success 200 {object} types.Channel @Failure 401 {string} string @Failure 404 {object} utils.HTTPError @Param channel_id path int true "Channel ID" @Router /channels/{channel_id} [get]
func GetChannels ¶
func GetChannels(c *fiber.Ctx) error
@Summary Get all channels @Description Get all channels of the current user @Security BasicAuth @Tags channels @Accept json @Produce json @Success 200 {array} types.Channel @Failure 401 {string} string @Failure 404 {object} utils.HTTPError @Router /channels [get]
func GetStrategies ¶
func GetStrategies(c *fiber.Ctx) error
@Summary Get all strategies @Description Get all strategies for a particular channel @Security BasicAuth @Tags strategies @Accept json @Produce json @Param channel_id path int true "Channel ID" @Success 200 {array} types.Strategy @Failure 401 {string} string @Failure 404 {object} utils.HTTPError @Router /channels/{channel_id}/strategies [get]
func GetStrategy ¶
func GetStrategy(c *fiber.Ctx) error
@Summary Get a strategy @Description Get a strategy by the channel id and the symbol @Security BasicAuth @Tags strategies @Accept json @Produce json @Param channel_id path int true "Channel ID" @Param strategy_symbol path string true "Strategy Symbol, use 'all' for the default strategy" @Success 200 {object} types.Strategy @Failure 401 {string} string @Failure 404 {object} utils.HTTPError @Router /channels/{channel_id}/strategies/{strategy_symbol} [get]
func GetUser ¶
func GetUser(c *fiber.Ctx) error
@Summary Get the current user @Description Get the current user, can be used to verify the user exists @Security BasicAuth @Tags users @Accept json @Produce json @Success 200 {object} types.GetUser @Failure 401 {string} string @Router /users [get]
func TriggerWebhook ¶
func TriggerWebhook(c *fiber.Ctx) error
func UpdateChannel ¶
func UpdateChannel(c *fiber.Ctx) error
@Summary Update a channel @Description Change the telegram id of a channel and keep all related strategies @Security BasicAuth @Tags channels @Accept json @Produce json @Success 200 {object} types.Channel @Failure 401 {string} string @Failure 404 {object} utils.HTTPError @Param channel_id path int true "Channel ID" @Param channel body types.UpdateChannel true "Channel to create" @Router /channels/{channel_id} [put]
func UpdateUser ¶
func UpdateUser(c *fiber.Ctx) error
@Summary Change the current users setting @Description Change the current users setting. The request body must contain either a new name or a new password. If both, the username and the password get changed. @Security BasicAuth @Tags users @Accept json @Produce json @Param user body types.AddUser true "Userupdate" @Success 204 {string} string @Failure 400 {object} utils.HTTPError @Failure 401 {string} string @Router /users [put]
Types ¶
This section is empty.