Documentation ¶
Index ¶
- Constants
- func BadReqIf(condition bool, format string, args ...interface{})
- func Call(c *Client, path string, args interface{}, res interface{}) error
- func ExampleID() ID
- func ExampleTime() time.Time
- func MustCall(c *Client, path string, args interface{}, res interface{})
- func Redirect(status int, url string)
- func ReturnIf(condition bool, status int, format string, args ...interface{})
- func Run(configs ...func(*Config))
- type ActionStats
- type Client
- type Config
- type Docs
- type DownStream
- type Endpoint
- type ErrMsg
- type MDo
- type MDoReq
- type MDoResp
- type Ping
- type SelfValidator
- type Tlbx
- type TlbxMware
- type TlbxMwares
- type UpStream
Constants ¶
View Source
const ( KB int64 = 1000 MB int64 = 1000000 GB int64 = 1000000000 ApiPathPrefix = "/api" ApiPathPrefixSegment = ApiPathPrefix + "/" )
Variables ¶
This section is empty.
Functions ¶
func ExampleTime ¶
Types ¶
type ActionStats ¶
type Config ¶
type Config struct { Log log.Log Version string StaticDir string ProvideApiDocs bool ContentSecurityPolicies []string // id IDGenPoolSize int // mdo MDoMax int MDoMaxBodyBytes int64 // tlbx TlbxSetup TlbxMwares TlbxCleanup TlbxMwares // app Name string Description string Endpoints []*Endpoint Serve func(http.HandlerFunc) }
type DownStream ¶
type DownStream struct { ID ID IsDownload bool // contains filtered or unexported fields }
func (*DownStream) MarshalJSON ¶
func (_ *DownStream) MarshalJSON() ([]byte, error)
func (*DownStream) MustFromResp ¶
func (s *DownStream) MustFromResp(r *http.Response)
type Endpoint ¶
type SelfValidator ¶
type SelfValidator interface {
MustBeValid(tlbx Tlbx)
}
type TlbxMwares ¶
type TlbxMwares []func(Tlbx)
type UpStream ¶
type UpStream struct { Args interface{} // contains filtered or unexported fields }
func (*UpStream) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.