Documentation ¶
Index ¶
- Constants
- Variables
- func EncodeResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
- type ErrorRes
- type Identifier
- type Metadata
- func (s *Metadata) FilterMap(predicateFunc func(string) bool, ...)
- func (s *Metadata) GetSubMetadata(key string) Metadata
- func (s *Metadata) IsApplicable(filterFunc func(string, interface{}) bool) bool
- func (s *Metadata) Merge(metadataToAdd Metadata)
- func (s *Metadata) RemoveKeys(keys []string)
- func (s *Metadata) RestrictKeys(predicate func(string) bool)
- func (s *Metadata) Scan(src interface{}) error
- type Response
- type Tags
Constants ¶
View Source
const (
ContentType = "application/json"
)
Variables ¶
View Source
var ( // ErrBadIdentifier indicates a bad identifer pattern ErrBadIdentifier = errors.New("invalid identifier, must match " + idRegexp) )
Functions ¶
func EncodeResponse ¶
func EncodeResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
Types ¶
type Identifier ¶
type Identifier struct {
// contains filtered or unexported fields
}
func NewIdentifier ¶
func NewIdentifier(v string) (Identifier, error)
func (*Identifier) IsValid ¶
func (i *Identifier) IsValid() bool
func (*Identifier) Scan ¶
func (i *Identifier) Scan(value interface{}) error
Scan - Implement the database/sql scanner interface
func (*Identifier) String ¶
func (i *Identifier) String() string
type Metadata ¶
type Metadata map[string]interface{}
Metadata Maybe a full object hierarchy
func (*Metadata) GetSubMetadata ¶ added in v0.26.0
GetSubMetadata gets the first substructure with the keyname or nil
func (*Metadata) IsApplicable ¶
func (*Metadata) RemoveKeys ¶
func (*Metadata) RestrictKeys ¶
Click to show internal directories.
Click to hide internal directories.