Documentation
¶
Index ¶
- type CreateNote
- type CreateNoteAttributes
- type CreateNoteListRequest
- type CreateNoteRequest
- type Details
- type Flag
- type Flagger
- type Flags
- type IdResponse
- type Included
- type Key
- type Links
- type Note
- type NoteAttributes
- type NoteListResponse
- type NoteResponse
- type Relation
- type RelationCollection
- type Resource
- type ResourceType
- type UpdateNote
- type UpdateNoteAttributes
- type UpdateNoteListResponse
- type UpdateNoteResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateNote ¶
type CreateNote struct { Key Attributes CreateNoteAttributes `json:"attributes"` }
type CreateNoteAttributes ¶
type CreateNoteListRequest ¶
type CreateNoteListRequest struct { Data []CreateNote `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` }
type CreateNoteRequest ¶
type CreateNoteRequest struct { Data CreateNote `json:"data"` Included Included `json:"included"` }
type Details ¶
type Details json.RawMessage
func (Details) MarshalJSON ¶
MarshalJSON - casts Details to []byte
func (*Details) UnmarshalJSON ¶
UnmarshalJSON - casts data to Details
type IdResponse ¶
type IdResponse struct {
Data Key `json:"data"`
}
func NewIdResponse ¶
func NewIdResponse(key Key) IdResponse
type Included ¶
type Included struct {
// contains filtered or unexported fields
}
Included - an array of Resource objects that are related to the primary data and/or each other (“included resources”).
func (Included) MarshalJSON ¶
MarshalJSON - marshals include collection as array of json objects
func (*Included) MustCreateNote ¶
func (c *Included) MustCreateNote(key Key) *CreateNote
MustCreateNote - returns CreateNote from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustNote ¶
MustNote - returns Log from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustUpdateNote ¶
func (c *Included) MustUpdateNote(key Key) *UpdateNote
MustUpdateNote - returns UpdateNote from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) UnmarshalJSON ¶
UnmarshalJSON - unmarshal array of json objects into include collection
type Key ¶
type Key struct { ID string `json:"id"` Type ResourceType `json:"type"` }
func NewKeyInt64 ¶
func NewKeyInt64(id int64, resourceType ResourceType) Key
func (Key) AsRelation ¶
type Note ¶
type Note struct { Key Attributes NoteAttributes `json:"attributes"` }
type NoteAttributes ¶
type NoteListResponse ¶
type NoteResponse ¶
type RelationCollection ¶
func (RelationCollection) MarshalJSON ¶
func (r RelationCollection) MarshalJSON() ([]byte, error)
type ResourceType ¶
type ResourceType string
const (
NOTES ResourceType = "notes"
)
List of ResourceType
type UpdateNote ¶
type UpdateNote struct { Key Attributes UpdateNoteAttributes `json:"attributes"` }
type UpdateNoteAttributes ¶
type UpdateNoteListResponse ¶
type UpdateNoteListResponse struct { Data []UpdateNote `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` }
type UpdateNoteResponse ¶
type UpdateNoteResponse struct { Data UpdateNote `json:"data"` Included Included `json:"included"` }