Documentation ¶
Index ¶
- type Details
- type Flag
- type Flagger
- type Flags
- type Included
- func (c *Included) Add(includes ...Resource)
- func (c Included) MarshalJSON() ([]byte, error)
- func (c *Included) MustMission(key Key) *Mission
- func (c *Included) MustMissionByExplorer(key Key) *MissionByExplorer
- func (c *Included) MustMissionByExplorerMissions(key Key) *MissionByExplorerMissions
- func (c *Included) UnmarshalJSON(data []byte) error
- type InvestInfo
- type Key
- type Links
- type Mission
- type MissionAttributes
- type MissionByExplorer
- type MissionByExplorerAttributes
- type MissionByExplorerInvestInfo
- type MissionByExplorerListResponse
- type MissionByExplorerMissions
- type MissionByExplorerMissionsAttributes
- type MissionByExplorerMissionsListResponse
- type MissionByExplorerMissionsResponse
- type MissionByExplorerResponse
- type MissionListResponse
- type MissionResponse
- type Relation
- type RelationCollection
- type Resource
- type ResourceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Details ¶
type Details json.RawMessage
func (Details) MarshalJSON ¶
MarshalJSON - casts Details to []byte
func (*Details) UnmarshalJSON ¶
UnmarshalJSON - casts data to Details
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) MustMission ¶
MustMission - returns Mission 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) MustMissionByExplorer ¶
func (c *Included) MustMissionByExplorer(key Key) *MissionByExplorer
MustMissionByExplorer - returns MissionByExplorer 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) MustMissionByExplorerMissions ¶
func (c *Included) MustMissionByExplorerMissions(key Key) *MissionByExplorerMissions
MustMissionByExplorerMissions - returns MissionByExplorerMissions 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 ¶
UmarshalJSON - unmarshal array of json objects into include collection
type InvestInfo ¶
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 Mission ¶
type Mission struct { Key Attributes MissionAttributes `json:"attributes"` }
type MissionAttributes ¶
type MissionAttributes struct { BoardingTime int64 `json:"boardingTime"` Description string `json:"description"` Duration int64 `json:"duration"` EndTime int64 `json:"endTime"` LaunchTime int64 `json:"launchTime"` MissionPower int64 `json:"missionPower"` MissionType int64 `json:"missionType"` Name string `json:"name"` NftContract string `json:"nftContract"` NftTokenURI string `json:"nftTokenURI"` Reward int64 `json:"reward"` SpaceshipCost int64 `json:"spaceshipCost"` TotalShips int64 `json:"totalShips"` }
type MissionByExplorer ¶
type MissionByExplorer struct { Key Attributes MissionByExplorerAttributes `json:"attributes"` }
type MissionByExplorerAttributes ¶
type MissionByExplorerAttributes struct { Address string `json:"address"` Missions []MissionByExplorerMissions `json:"missions"` TotalInvestInfo MissionByExplorerInvestInfo `json:"totalInvestInfo"` }
type MissionByExplorerListResponse ¶
type MissionByExplorerListResponse struct { Data []MissionByExplorer `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` }
type MissionByExplorerMissions ¶
type MissionByExplorerMissions struct { Key Attributes MissionByExplorerMissionsAttributes `json:"attributes"` }
type MissionByExplorerMissionsAttributes ¶
type MissionByExplorerMissionsAttributes struct { BoardingTime int64 `json:"boardingTime"` Description string `json:"description"` Duration int64 `json:"duration"` EndTime int64 `json:"endTime"` InvestInfo InvestInfo `json:"investInfo"` LaunchTime int64 `json:"launchTime"` MissionPower int64 `json:"missionPower"` MissionType int64 `json:"missionType"` Name string `json:"name"` NftContract string `json:"nftContract"` NftTokenURI string `json:"nftTokenURI"` Reward int64 `json:"reward"` SpaceshipCost int64 `json:"spaceshipCost"` TotalShips int64 `json:"totalShips"` }
type MissionByExplorerMissionsListResponse ¶
type MissionByExplorerMissionsListResponse struct { Data []MissionByExplorerMissions `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` }
type MissionByExplorerMissionsResponse ¶
type MissionByExplorerMissionsResponse struct { Data MissionByExplorerMissions `json:"data"` Included Included `json:"included"` }
type MissionByExplorerResponse ¶
type MissionByExplorerResponse struct { Data MissionByExplorer `json:"data"` Included Included `json:"included"` }
type MissionListResponse ¶
type MissionResponse ¶
type RelationCollection ¶
func (RelationCollection) MarshalJSON ¶
func (r RelationCollection) MarshalJSON() ([]byte, error)
type ResourceType ¶
type ResourceType string
const ( MISSION ResourceType = "mission" EXPLORER ResourceType = "explorer" )
List of ResourceType
Source Files ¶
- db.go
- flag.go
- included.go
- model_details.go
- model_invest_info.go
- model_key.go
- model_links.go
- model_mission.go
- model_mission_attributes.go
- model_mission_by_explorer.go
- model_mission_by_explorer_attributes.go
- model_mission_by_explorer_invest_info.go
- model_mission_by_explorer_missions.go
- model_mission_by_explorer_missions_attributes.go
- model_relation.go
- model_relation_collection.go
- model_resource_type.go