models

package
v0.0.0-...-8832f83 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contextionary

type Contextionary struct {

	// hash
	Hash *ContextionaryHash `json:"hash,omitempty"`

	// URL where the contextionary can be found
	URL string `json:"url,omitempty"`
}

Contextionary contextionary swagger:model Contextionary

func (*Contextionary) MarshalBinary

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

MarshalBinary interface implementation

func (*Contextionary) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Contextionary) Validate

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

Validate validates this contextionary

type ContextionaryHash

type ContextionaryHash struct {

	// Hash algorithm
	Algorithm string `json:"algorithm,omitempty"`

	// The actual hash
	Value string `json:"value,omitempty"`
}

ContextionaryHash contextionary hash swagger:model ContextionaryHash

func (*ContextionaryHash) MarshalBinary

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

MarshalBinary interface implementation

func (*ContextionaryHash) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*ContextionaryHash) Validate

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

Validate validates this contextionary hash

type Peer

type Peer struct {
	PeerUpdate

	// Unique ID of this peer registration, will be updated if the peer conntects again to the network.
	// Format: uuid
	ID strfmt.UUID `json:"id,omitempty"`

	// When we were received a ping from this peer from the last time
	LastContactAt int64 `json:"last_contact_at,omitempty"`

	// The latest known hash of the local schema of the peer
	SchemaHash string `json:"schema_hash,omitempty"`
}

Peer peer swagger:model Peer

func (*Peer) MarshalBinary

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

MarshalBinary interface implementation

func (Peer) MarshalJSON

func (m Peer) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object to a JSON structure

func (*Peer) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*Peer) UnmarshalJSON

func (m *Peer) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object from a JSON structure

func (*Peer) Validate

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

Validate validates this peer

type PeerPing

type PeerPing struct {

	// (base64 encoded) hash of the current schema
	SchemaHash string `json:"schemaHash,omitempty"`
}

PeerPing peer ping swagger:model PeerPing

func (*PeerPing) MarshalBinary

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

MarshalBinary interface implementation

func (*PeerPing) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*PeerPing) Validate

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

Validate validates this peer ping

type PeerRegistrationResponse

type PeerRegistrationResponse struct {

	// contextionary
	Contextionary *Contextionary `json:"contextionary,omitempty"`

	// peer
	Peer *Peer `json:"peer,omitempty"`
}

PeerRegistrationResponse peer registration response swagger:model PeerRegistrationResponse

func (*PeerRegistrationResponse) MarshalBinary

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

MarshalBinary interface implementation

func (*PeerRegistrationResponse) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*PeerRegistrationResponse) Validate

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

Validate validates this peer registration response

type PeerUpdate

type PeerUpdate struct {

	// Name of the peer, must be valid DNS name
	PeerName string `json:"peerName,omitempty"`

	// Host or IP of the peer, defaults to peerName
	// Format: uri
	PeerURI strfmt.URI `json:"peerUri,omitempty"`
}

PeerUpdate peer update swagger:model PeerUpdate

func (*PeerUpdate) MarshalBinary

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

MarshalBinary interface implementation

func (*PeerUpdate) UnmarshalBinary

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

UnmarshalBinary interface implementation

func (*PeerUpdate) Validate

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

Validate validates this peer update

Jump to

Keyboard shortcuts

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