Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataLicense ¶
type DataLicense int
enum of public private or licenced data
const ( PUBLIC DataLicense = iota PRIVATE LICENCED )
type DataResource ¶
type DataResource struct { resource_model.AbstractResource // AbstractResource contains the basic fields of an object (id, name) resource_model.WebResource Type string `bson:"type,omitempty" json:"type,omitempty"` // Type is the type of the storage UsageConditions UsageConditions `json:"usage_conditions,omitempty" bson:"usage_conditions,omitempty" description:"usage conditions of the data"` // UsageConditions is the usage conditions of the data License DataLicense `json:"license" bson:"license" description:"license of the data" default:"0"` // License is the license of the data Interest DataLicense `json:"interest" bson:"interest" description:"interest of the data" default:"0"` // Interest is the interest of the data Example string `json:"example,omitempty" bson:"example,omitempty" description:"base64 encoded data"` // Example is an example of the data }
* DataResource is a struct that represents a data resource * it defines the resource data
func (*DataResource) Deserialize ¶
func (dma *DataResource) Deserialize(j map[string]interface{}) utils.DBObject
func (*DataResource) GetAccessor ¶
func (d *DataResource) GetAccessor(caller *tools.HTTPCaller) utils.Accessor
func (*DataResource) Serialize ¶
func (dma *DataResource) Serialize() map[string]interface{}
type UsageConditions ¶
type UsageConditions struct { Usage string `json:"usage,omitempty" bson:"usage,omitempty" description:"usage of the data"` // Usage is the usage of the data Actors []string `json:"actors,omitempty" bson:"actors,omitempty" description:"actors of the data"` // Actors is the actors of the data }
* Struct of Usage Conditions
Click to show internal directories.
Click to hide internal directories.