Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkCollection ¶
type Mapper ¶
type Mapper interface {
GetMap() Entry
}
Mapper is the interface implemented by the objects that can be converted into HAL format.
type Resource ¶
type Resource struct {
Payload Mapper
Links LinkCollection
Embedded []*Resource
}
Resource is a struct that stores a resource data. It represents a converted object in the HAL spec by containing all its fields and also a set of related links and a sub-set of recursively related resources.
func NewResource ¶
NewResource creates a Resource object for a given struct and its link.
func (*Resource) AddNewLink ¶
AddNewLink appends a new Link object based on the rel and href params.
func (Resource) MarshalJSON ¶
MarshalJSON is a Marshaler interface implementation for Resource struct
Click to show internal directories.
Click to hide internal directories.