Documentation ¶
Index ¶
- Variables
- func GetServerAddrForGuild(guildID int64) string
- func GetServerAddrForShard(shard int) string
- func GetWithAddress(addr string, url string, dest interface{}) error
- func GetWithGuild(guildID int64, url string, dest interface{}) error
- func GetWithShard(shard int, url string, dest interface{}) error
- func PostWithAddress(serverAddr string, url string, bodyData interface{}, dest interface{}) error
- func PostWithGuild(guildID int64, url string, bodyData interface{}, dest interface{}) error
- func PostWithShard(shard int, url string, bodyData interface{}, dest interface{}) error
- func RegisterPlugin()
- func ServeJson(w http.ResponseWriter, r *http.Request, data interface{})
- func ServerError(w http.ResponseWriter, r *http.Request, err error) bool
- type InternalAPIPlugin
- type Plugin
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServerError = errors.New("internal api server is having issues") ErrCantFindAddress = errors.New("can't find address for provided shard") )
View Source
var (
ConfListenPortRange = config.RegisterOption("yagpdb.botrest.port_range", "botrest listen port range", "5100-5999")
)
Functions ¶
func GetServerAddrForGuild ¶
func GetServerAddrForShard ¶
func GetWithAddress ¶
func GetWithGuild ¶
func GetWithShard ¶
func PostWithAddress ¶
func PostWithGuild ¶
func PostWithShard ¶
func RegisterPlugin ¶
func RegisterPlugin()
func ServerError ¶
Returns true if an error occured
Types ¶
type InternalAPIPlugin ¶
type InternalAPIPlugin interface {
InitInternalAPIRoutes(mux *goji.Mux)
}
InternalAPIPlugin represents a plugin that provides interactions with the internal apis
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) PluginInfo ¶
func (p *Plugin) PluginInfo() *common.PluginInfo
Click to show internal directories.
Click to hide internal directories.