Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct {
// config
Config *Config `json:"config,omitempty"`
// description
// Required: true
Description *Description `json:"description"`
// Expires At
// Required: true
Exp *float64 `json:"exp"`
// A list of streams
// Required: true
Streams []*Stream `json:"streams"`
// User interfaces
// Required: true
Uis []*UserInterface `json:"uis"`
}
Activity activity
An activity represents connection details to instances of pre-agreed resource types such as video, data streams and user interfaces.
swagger:model activity
func (*Activity) ContextValidate ¶
ContextValidate validate this activity based on the context it is used
func (*Activity) MarshalBinary ¶
MarshalBinary interface implementation
func (*Activity) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Bookings ¶
type Bookings struct {
// Array of activities, including credentials, sufficient to permit access to the activities
// Required: true
Activities []*Activity `json:"activities"`
// if true, no new bookings are being accepted
Locked bool `json:"locked,omitempty"`
// Maximum concurrent bookings permitted
// Required: true
Max *int64 `json:"max"`
// message of the day, typically to explain any current or upcoming locked periods
// Example: Preview Access: sessions will be available from 10am - 5pm GMT today
Msg string `json:"msg,omitempty"`
}
Bookings details of bookings held
Contains credentials to access currently booked activities and info on max concurrent sessions ¶
swagger:model bookings
func (*Bookings) ContextValidate ¶
ContextValidate validate this bookings based on the context it is used
func (*Bookings) MarshalBinary ¶
MarshalBinary interface implementation
func (*Bookings) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Bookingtoken ¶
type Bookingtoken struct {
// Audience
// Required: true
Aud *string `json:"aud"`
// Expires At
// Required: true
Exp *float64 `json:"exp"`
// List of group names (not ID)
// Required: true
Groups []string `json:"groups"`
// Issued At
Iat float64 `json:"iat,omitempty"`
// Not before
// Required: true
Nbf *float64 `json:"nbf"`
// List of pool IDs (not name)
Pools []string `json:"pools"`
// List of scopes
// Required: true
Scopes []string `json:"scopes"`
// Subject
// Required: true
Sub *string `json:"sub"`
// booking token
// Example: ey...
// Required: true
Token *string `json:"token"`
}
Bookingtoken booking token details
contains token plus its details
swagger:model bookingtoken
func (*Bookingtoken) ContextValidate ¶
ContextValidate validates this bookingtoken based on context it is used
func (*Bookingtoken) MarshalBinary ¶
func (m *Bookingtoken) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Bookingtoken) UnmarshalBinary ¶
func (m *Bookingtoken) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Config ¶
type Config struct {
// URL at which to GET the configuration object
// Example: https://assets.practable.io/config/experiments/pvna/pvna01-0.0.json
// Required: true
URL *string `json:"url"`
}
Config config
a link to a configuration object hosted elsewhere Example: {"url":"experiments/pvna/pvna01-0.0.json"}
swagger:model config
func (*Config) ContextValidate ¶
ContextValidate validates this config based on context it is used
func (*Config) MarshalBinary ¶
MarshalBinary interface implementation
func (*Config) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Description ¶
type Description struct {
// URL for further information
// Example: https://static.practable.io/info/penduino/ui.html
Further string `json:"further,omitempty"`
// Identification used in PoolStore
ID string `json:"id,omitempty"`
// URL of main image (500x500)
// Example: https://assets.practable.io/images/penduino-500x500.png
Image string `json:"image,omitempty"`
// 280 char additional description of the interface in plain text
Long string `json:"long,omitempty"`
// Display name
// Example: Penduino (basic)
// Required: true
Name *string `json:"name"`
// 140 char max description of the interface in plain text
// Example: Interface to the penduino electromagnetic pendulum with variable drive, active braking, short and open circuit loading.
Short string `json:"short,omitempty"`
// URL of thumbnail image (150x150)
// Example: https://assets.practable.io/images/penduino-150x150.png
Thumb string `json:"thumb,omitempty"`
// Type of resource being described, e.g. pool, activity, userinterface
// Example: userinterface
// Required: true
Type *string `json:"type"`
}
Description description
Description of a resource e.g. pool, activity, user interface Example: {"further":"https://static.practable.io/descriptions/pools/penduino/index.html","image":"https://assets.practable.io/images/pools/penduino/image.png","long":"Some longer description","name":"Penduino (basic)","short":"Penduino electromagnetic pendulums with pulsed drive and braking","thumb":"https://assets.practable.io/images/pools/penduino/thumb.png","type":"pool"}
swagger:model description
func (*Description) ContextValidate ¶
ContextValidate validates this description based on context it is used
func (*Description) MarshalBinary ¶
func (m *Description) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Description) UnmarshalBinary ¶
func (m *Description) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Group ¶
type Group struct {
// description
// Required: true
Description *Description `json:"description"`
// pools
Pools []string `json:"pools"`
}
Group group
Represents a group (must have a name for tokens to work)
swagger:model group
func (*Group) ContextValidate ¶
ContextValidate validate this group based on the context it is used
func (*Group) MarshalBinary ¶
MarshalBinary interface implementation
func (*Group) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type ID ¶
type ID struct {
// identification
// Example: d220c320-eb88-456b-b1dd-b36dae840af2
// Required: true
ID *string `json:"id"`
}
ID id
id of a resource Example: {"id":"d220c320-eb88-456b-b1dd-b36dae840af2"}
swagger:model id
func (*ID) ContextValidate ¶
ContextValidate validates this id based on context it is used
func (*ID) MarshalBinary ¶
MarshalBinary interface implementation
func (*ID) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type IDList ¶
type IDList []string
IDList ID list
list of ids (in array)
swagger:model id_list
func (IDList) ContextValidate ¶
ContextValidate validates this id list based on context it is used
type Permission ¶
type Permission struct {
// audience
// Required: true
Audience *string `json:"audience"`
// connection type
// Required: true
ConnectionType *string `json:"connection_type"`
// scopes
// Required: true
Scopes []string `json:"scopes"`
// topic
// Required: true
Topic *string `json:"topic"`
}
Permission relay permission
Represents fields needed in relay permission tokens ¶
swagger:model permission
func (*Permission) ContextValidate ¶
ContextValidate validates this permission based on context it is used
func (*Permission) MarshalBinary ¶
func (m *Permission) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Permission) UnmarshalBinary ¶
func (m *Permission) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Pool ¶
type Pool struct {
// description
// Required: true
Description *Description `json:"description"`
// max session
MaxSession int64 `json:"max_session,omitempty"`
// min session
MinSession int64 `json:"min_session,omitempty"`
}
Pool pool
Represents a pool ¶
swagger:model pool
func (*Pool) ContextValidate ¶
ContextValidate validate this pool based on the context it is used
func (*Pool) MarshalBinary ¶
MarshalBinary interface implementation
func (*Pool) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Poolstore ¶
type Poolstore struct {
// base64-encoded string representing bookingstore in JSON format
// Required: true
Booking *string `json:"booking"`
// base64-encoded string representing PoolStore in JSON format
// Required: true
Pool *string `json:"pool"`
}
Poolstore Pool Store
complete status required for failover. Encoded strings used for convenience and seperation of concerns, at cost of performance.
swagger:model poolstore
func (*Poolstore) ContextValidate ¶
ContextValidate validates this poolstore based on context it is used
func (*Poolstore) MarshalBinary ¶
MarshalBinary interface implementation
func (*Poolstore) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Status ¶
type Status struct {
// Number of available kits
// Example: 3
// Required: true
Available *int64 `json:"available"`
// Kit available later?
// Example: true
Later bool `json:"later,omitempty"`
// Number of kits in use
// Example: 5
Used int64 `json:"used,omitempty"`
// Wait time in seconds until first kit available later
// Example: 3200
Wait int64 `json:"wait,omitempty"`
}
Status status
Status of a pool Example: {"available":3,"inuse":5,"wait":0}
swagger:model status
func (*Status) ContextValidate ¶
ContextValidate validates this status based on context it is used
func (*Status) MarshalBinary ¶
MarshalBinary interface implementation
func (*Status) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type StoreStatus ¶
type StoreStatus struct {
// activities
Activities int64 `json:"activities,omitempty"`
// bookings
Bookings int64 `json:"bookings,omitempty"`
// groups
Groups int64 `json:"groups,omitempty"`
// last booking ends
LastBookingEnds float64 `json:"last_booking_ends,omitempty"`
// locked
Locked bool `json:"locked,omitempty"`
// msg
Msg string `json:"msg,omitempty"`
// pools
Pools int64 `json:"pools,omitempty"`
}
StoreStatus Store status
Counts of groups, pools, activities, booked sessions ¶
swagger:model store_status
func (*StoreStatus) ContextValidate ¶
ContextValidate validates this store status based on context it is used
func (*StoreStatus) MarshalBinary ¶
func (m *StoreStatus) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*StoreStatus) UnmarshalBinary ¶
func (m *StoreStatus) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Stream ¶
type Stream struct {
// Describes the stream, and doubles as template key in the URL
// Example: video
// Required: true
For *string `json:"for"`
// permission
// Required: true
Permission *Permission `json:"permission"`
// JWT bearer token for submitting in the header when making the request at the URL
Token string `json:"token,omitempty"`
// URL at which to obtain access to the stream (getting a redirect URL containing a one time code)
// Example: https://relay-access.practable.io/session/abc123
// Required: true
URL *string `json:"url"`
// HTPP verb to use when making request to the URL
// Example: POST
Verb *string `json:"verb,omitempty"`
}
Stream stream
Represents an assigned, valid booking slot for an individual piece of equipment Example: {"for":"video","token":"ey....","url":"https://relay-access.practable.io/session/abc123"}
swagger:model stream
func (*Stream) ContextValidate ¶
ContextValidate validate this stream based on the context it is used
func (*Stream) MarshalBinary ¶
MarshalBinary interface implementation
func (*Stream) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type UserInterface ¶
type UserInterface struct {
// description
// Required: true
Description *Description `json:"description"`
// list of names of required streams
// Example: ["data","video"]
StreamsRequired []string `json:"streamsRequired"`
// URL of the user interface
// Example: https://static.practable.io/ui/penduino-basic.html?video={{video}}\u0026data={{data}}
// Required: true
URL *string `json:"url"`
}
UserInterface userInterface
User interface ¶
swagger:model userInterface
func (*UserInterface) ContextValidate ¶
ContextValidate validate this user interface based on the context it is used
func (*UserInterface) MarshalBinary ¶
func (m *UserInterface) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*UserInterface) UnmarshalBinary ¶
func (m *UserInterface) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation