Documentation ¶
Index ¶
Constants ¶
View Source
const ( ActorAttribute = "actor" ActorConsumer = "consumer" ActorAdmin = "admin" )
Available actor type
View Source
const ( ObjectTypeAdmin = "admin" ObjectTypeConsumer = "consumer" ObjectTypeResource = "resource" ObjectTypeResourcesDeleted = "resources-deleted" )
List of object type stored in the ledger
View Source
const ( ResourcesFilterAll = "all" ResourcesFilterOnlyAvailable = "only-available" )
List of available filter for query resources
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resource ¶
type Resource struct { ID string `json:"id"` Description string `json:"description"` Available bool `json:"available"` Mission string `json:"mission,omitempty"` Consumer string `json:"consumer,omitempty"` }
Resource that is manage by an admin actor and can be acquire and release by a consumer
type ResourceHistories ¶
type ResourceHistories []ResourceHistory
ResourceHistories the list of state in the ledger of a resource (with sorting, older at the end)
func (ResourceHistories) Len ¶
func (a ResourceHistories) Len() int
func (ResourceHistories) Less ¶
func (a ResourceHistories) Less(i, j int) bool
func (ResourceHistories) Swap ¶
func (a ResourceHistories) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.