resources

package
v0.0.0-...-0246943 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type License

type License struct {
	Key          string    `json:"key" gorethink:"key"`
	Expiration   time.Time `json:"expiration" gorethink:"expiration"`
	NeverExpires bool      `json:"neverExpires" gorethink:"never_expires"`
	Capacity     int       `json:"capacity" gorethink:"capacity"`
	Users        []string  `json:"users" gorethink:"users"`
}

Software License

type Resource

type Resource interface {
	//Requirements() map[string]string
	//Grant(credentials.Credential)
	//Revoke(credentials.Credential)
	GetName() string
}

func UnmarshalJSON

func UnmarshalJSON(req *http.Request) (Resource, error)

type ResourceInfo

type ResourceInfo struct {
	Id   string `gorethink:"id,omitempty" json:"id"`
	Name string `json:"name" gorethink:"name" binding:"required"`
	Type string `json:"type" gorethink:"type" binding:"required"`
}

func (ResourceInfo) GetName

func (i ResourceInfo) GetName() string

type Software

type Software struct {
	ResourceInfo
	Licenses []License `json:"licenses" gorethink:"licenses"`
}

func (*Software) Unmarshal

func (sw *Software) Unmarshal(raw json.RawMessage) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL