Documentation ¶
Index ¶
- func ConstructUriFromTemplate(template string, parameters ...interface{}) string
- type ConfigureLink
- type ConfigureMap
- func (cm *ConfigureMap) EndMap() *Resource
- func (cm *ConfigureMap) Exclude(fieldName string) *ConfigureMap
- func (cm *ConfigureMap) Map(fieldName string, mapOptions ...option.Option) *ConfigureMap
- func (cm *ConfigureMap) MapAll() *ConfigureMap
- func (cm *ConfigureMap) MapChild(fieldName string) *ConfigureMap
- type EmbeddedResources
- type FormattedData
- type Link
- type LinkData
- type LinkParameter
- type MappedData
- type Resource
- func (r *Resource) Data(name string, value interface{}, mapOptions ...option.Option) *Resource
- func (r *Resource) EmbedResource(name string, resource Resource) *Resource
- func (r *Resource) EmbedResources(name string, resources []Resource) *Resource
- func (r *Resource) Link(name string, href string, linkOptions ...option.Option) ConfigureLink
- func (r *Resource) MapAllDataFrom(source interface{}) *Resource
- func (r *Resource) MapChild(fieldName string, source interface{}) *ConfigureMap
- func (r *Resource) MapDataFrom(source interface{}) *ConfigureMap
- func (r Resource) MarshalXML(e *xml.Encoder, _ xml.StartElement) error
- func (r *Resource) Uri(href string) *Resource
- type ResponseCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructUriFromTemplate ¶ added in v0.3.0
Types ¶
type ConfigureLink ¶ added in v0.3.0
type ConfigureLink struct {
// contains filtered or unexported fields
}
func (ConfigureLink) Parameter ¶ added in v0.3.0
func (cl ConfigureLink) Parameter(name string, parameterOptions ...option.Option) ConfigureLink
func (ConfigureLink) ResponseCodes ¶ added in v0.3.0
func (cl ConfigureLink) ResponseCodes(statuses ...int) ConfigureLink
func (ConfigureLink) ResponseSchema ¶ added in v0.5.0
func (cl ConfigureLink) ResponseSchema(responseSchema string) ConfigureLink
type ConfigureMap ¶
type ConfigureMap struct {
// contains filtered or unexported fields
}
func (*ConfigureMap) EndMap ¶
func (cm *ConfigureMap) EndMap() *Resource
func (*ConfigureMap) Exclude ¶
func (cm *ConfigureMap) Exclude(fieldName string) *ConfigureMap
func (*ConfigureMap) Map ¶
func (cm *ConfigureMap) Map(fieldName string, mapOptions ...option.Option) *ConfigureMap
func (*ConfigureMap) MapAll ¶
func (cm *ConfigureMap) MapAll() *ConfigureMap
func (*ConfigureMap) MapChild ¶
func (cm *ConfigureMap) MapChild(fieldName string) *ConfigureMap
type EmbeddedResources ¶
type EmbeddedResources map[string]interface{}
type FormattedData ¶
type FormattedData struct { Value interface{} // contains filtered or unexported fields }
func (FormattedData) FormattedString ¶
func (fd FormattedData) FormattedString() string
func (FormattedData) MarshalJSON ¶
func (fd FormattedData) MarshalJSON() ([]byte, error)
type Link ¶
type Link struct { Href string Verb string IsTemplated bool Parameters []LinkParameter ResponseSchema string ResponseCodes []int }
func (*Link) MarshalJSON ¶
type LinkParameter ¶
type MappedData ¶
type MappedData map[string]interface{}
type Resource ¶
type Resource struct { Schema string Values MappedData Links LinkData Embedded EmbeddedResources }
func NewResource ¶
func (*Resource) EmbedResource ¶
func (*Resource) EmbedResources ¶
func (*Resource) MapAllDataFrom ¶
func (*Resource) MapChild ¶
func (r *Resource) MapChild(fieldName string, source interface{}) *ConfigureMap
func (*Resource) MapDataFrom ¶
func (r *Resource) MapDataFrom(source interface{}) *ConfigureMap
func (Resource) MarshalXML ¶
type ResponseCode ¶ added in v0.3.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.