Documentation ¶
Index ¶
- Constants
- func DecodeQuery(vals url.Values, out interface{}) error
- func EncodeQuery(in interface{}) (string, error)
- func WithGet(f http.HandlerFunc) http.HandlerFunc
- func WithGetOrPost(f http.HandlerFunc) http.HandlerFunc
- func WithLogging(f http.HandlerFunc) http.HandlerFunc
- func WithPost(f http.HandlerFunc) http.HandlerFunc
- type ConceptInfo
- type Context
- type DumpFileContent
- type PutData
- type Resolver
- type Server
Constants ¶
const ( ThematicResolver = "thematic" RuledResolver = "ruled" SimpleResolver = "simple" )
Names for the different resolver types.
Variables ¶
This section is empty.
Functions ¶
func DecodeQuery ¶
DecodeQuery decodes a query into the given struct. It can only be used to decode bool, int, float32, float64 and string values or slices of one of these types. All other typed fields of the given struct are ignored.
func EncodeQuery ¶
EncodeQuery encodes a query using the given struct. It can only encode bool, int, float32, float64 and string values or slices of one of these types. All other typed fields in the struct are ignored.
func WithGet ¶
func WithGet(f http.HandlerFunc) http.HandlerFunc
WithGet wraps a HandlerFunc and checks if the request method is GET. If not, an error is logged and the handler function is not called.
func WithGetOrPost ¶
func WithGetOrPost(f http.HandlerFunc) http.HandlerFunc
WithGetOrPost wraps a HandlerFunc and checks if the request method is GET or POST. If not, an error is logged and the handler function is not called.
func WithLogging ¶
func WithLogging(f http.HandlerFunc) http.HandlerFunc
WithLogging wraps a HandlerFunc and logs the handling of the request.
func WithPost ¶
func WithPost(f http.HandlerFunc) http.HandlerFunc
WithPost wraps a HandlerFunc and checks if the request method is POST. If not, an error is logged and the handler function is not called.
Types ¶
type ConceptInfo ¶
ConceptInfo holds information about a concept.
func (ConceptInfo) Predicates ¶
func (info ConceptInfo) Predicates() map[*semix.Concept][]*semix.Concept
Predicates returns a map of the targets ordered by the predicates.
type DumpFileContent ¶
type DumpFileContent struct {
ContentType, Content, Path string
}
DumpFileContent defines the content and the content type of a dump file.
type PutData ¶
type PutData struct { URL string Local bool Errors []int Resolvers []Resolver ContentType string Content string }
PutData defines the data that is send to the server's put method
type Resolver ¶
Resolver defines one of the three resolvers simple, automatic or ruled as defined in bitbucket.org/fflo/semix/pkg/resolve