models

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

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

func (m *Activity) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this activity based on the context it is used

func (*Activity) MarshalBinary

func (m *Activity) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Activity) UnmarshalBinary

func (m *Activity) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Activity) Validate

func (m *Activity) Validate(formats strfmt.Registry) error

Validate validates this activity

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

func (m *Bookings) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this bookings based on the context it is used

func (*Bookings) MarshalBinary

func (m *Bookings) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Bookings) UnmarshalBinary

func (m *Bookings) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Bookings) Validate

func (m *Bookings) Validate(formats strfmt.Registry) error

Validate validates this bookings

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

func (m *Bookingtoken) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*Bookingtoken) Validate

func (m *Bookingtoken) Validate(formats strfmt.Registry) error

Validate validates this bookingtoken

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

func (m *Config) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this config based on context it is used

func (*Config) MarshalBinary

func (m *Config) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Config) UnmarshalBinary

func (m *Config) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Config) Validate

func (m *Config) Validate(formats strfmt.Registry) error

Validate validates this config

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

func (m *Description) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*Description) Validate

func (m *Description) Validate(formats strfmt.Registry) error

Validate validates this description

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

func (m *Group) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this group based on the context it is used

func (*Group) MarshalBinary

func (m *Group) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Group) UnmarshalBinary

func (m *Group) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Group) Validate

func (m *Group) Validate(formats strfmt.Registry) error

Validate validates this group

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

func (m *ID) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this id based on context it is used

func (*ID) MarshalBinary

func (m *ID) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*ID) UnmarshalBinary

func (m *ID) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ID) Validate

func (m *ID) Validate(formats strfmt.Registry) error

Validate validates this id

type IDList

type IDList []string

IDList ID list

list of ids (in array)

swagger:model id_list

func (IDList) ContextValidate

func (m IDList) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this id list based on context it is used

func (IDList) Validate

func (m IDList) Validate(formats strfmt.Registry) error

Validate validates this id list

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

func (m *Permission) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*Permission) Validate

func (m *Permission) Validate(formats strfmt.Registry) error

Validate validates this permission

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

func (m *Pool) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this pool based on the context it is used

func (*Pool) MarshalBinary

func (m *Pool) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Pool) UnmarshalBinary

func (m *Pool) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Pool) Validate

func (m *Pool) Validate(formats strfmt.Registry) error

Validate validates this pool

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

func (m *Poolstore) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this poolstore based on context it is used

func (*Poolstore) MarshalBinary

func (m *Poolstore) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Poolstore) UnmarshalBinary

func (m *Poolstore) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Poolstore) Validate

func (m *Poolstore) Validate(formats strfmt.Registry) error

Validate validates this poolstore

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

func (m *Status) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this status based on context it is used

func (*Status) MarshalBinary

func (m *Status) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Status) UnmarshalBinary

func (m *Status) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Status) Validate

func (m *Status) Validate(formats strfmt.Registry) error

Validate validates this status

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

func (m *StoreStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*StoreStatus) Validate

func (m *StoreStatus) Validate(formats strfmt.Registry) error

Validate validates this store status

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

func (m *Stream) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validate this stream based on the context it is used

func (*Stream) MarshalBinary

func (m *Stream) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Stream) UnmarshalBinary

func (m *Stream) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Stream) Validate

func (m *Stream) Validate(formats strfmt.Registry) error

Validate validates this stream

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

func (m *UserInterface) ContextValidate(ctx context.Context, formats strfmt.Registry) error

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

func (*UserInterface) Validate

func (m *UserInterface) Validate(formats strfmt.Registry) error

Validate validates this user interface

Jump to

Keyboard shortcuts

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