Documentation ¶
Index ¶
- Constants
- Variables
- func IsUrlType(t reflect.Type) bool
- func Js(x interface{}) string
- func MakeSlice(x interface{}, len int)
- func PathElementChoices(elem string) (results []string)
- func Resize(x interface{}, len int)
- type Api
- type AuthenticateFunc
- type Console
- type Int
- type JsonMarshalFunc
- type JsonUnmarshalFunc
- type Number
- type Option
- type Quark
- func (q *Quark) RegisterService(instances ...interface{})
- func (q *Quark) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (q *Quark) SwaggerSchemaFromStruct(t reflect.Type, omit_url_parameters bool) (schema spec.Schema)
- func (q *Quark) SwaggerSchemaFromType(t reflect.Type, omit_url_parameters bool) (schema spec.Schema)
- func (q *Quark) SwaggerSpec() *spec.Swagger
- func (q *Quark) WithAuthenticate(f AuthenticateFunc)
- func (q *Quark) WithPathPrefix(p []string)
- type Service
- type String
- type TypeAndFormat
Constants ¶
View Source
const (
ROOT_SERVICE_NAME = "root"
)
Variables ¶
Functions ¶
func PathElementChoices ¶
Types ¶
type Api ¶
type Api struct { Method string // blank means any, or http.MethodXXX Path string Request reflect.Type Response reflect.Type ReflectMethod reflect.Method PathVars []util.PathVar // key: path element pos, value: i/s/f.{varname} QueryVars map[string]int // key: var name, value: pos in req struct // contains filtered or unexported fields }
func (*Api) SwaggerOperations ¶
func (*Api) SwaggerPathItem ¶
type AuthenticateFunc ¶
type Console ¶
type Console struct {
// contains filtered or unexported fields
}
func NewConsole ¶
func (Console) ResponseWriter ¶
func (c Console) ResponseWriter() http.ResponseWriter
func (*Console) SaveContext ¶
func (c *Console) SaveContext(a interface{})
type JsonMarshalFunc ¶
type JsonUnmarshalFunc ¶
type Option ¶
type Option struct { Authenticate AuthenticateFunc PathPrefix []string }
type Quark ¶
type Quark struct { Marshal JsonMarshalFunc Unmarshal JsonUnmarshalFunc Services []Service // contains filtered or unexported fields }
func (*Quark) RegisterService ¶
func (q *Quark) RegisterService(instances ...interface{})
func (*Quark) SwaggerSchemaFromStruct ¶
func (*Quark) SwaggerSchemaFromType ¶
func (*Quark) SwaggerSpec ¶
func (*Quark) WithAuthenticate ¶
func (q *Quark) WithAuthenticate(f AuthenticateFunc)
func (*Quark) WithPathPrefix ¶
type Service ¶
type TypeAndFormat ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.