models

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package models provides models for data storage and transfer.

Index

Constants

View Source
const (
	RequestStatusAccepted   = "Accepted"
	RequestStatusProcessing = "Processing"
	RequestStatusCompleted  = "Completed"
	RequestStatusFailed     = "Failed"
	RequestStatusReturned   = "Returned"
)

Request Datastore Field Values

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientRequest

type ClientRequest struct {
	Hostname   string
	ClientID   string
	ClientCert []byte

	// Unattended validation
	GCEMetadata gce.Metadata

	// Generators
	GeneratorID   string
	GeneratorData []byte
}

ClientRequest models the allowable data that a client (the CLI) can submit as part of a request to be joined.

type Request

type Request struct {
	RequestID      string
	ClientID       string
	ClientCert     []byte
	Hostname       string
	AcceptTime     time.Time
	ClaimBy        string
	ClaimTime      time.Time
	Status         string
	CompletionTime time.Time
	ResponseData   []byte

	// Unattended validation
	GCEMetadata gce.Metadata

	ResponseKey []byte
	CipherNonce []byte

	AttemptReuse bool

	// (Optional) GeneratorID identifies the hostname generator to be used by SpliceD.
	GeneratorID string

	// (Optional) GeneratorData allows for arbitrary add-on data to be encoded by the CLI
	// for use by SpliceD. Its use will be generator-specific.
	GeneratorData []byte
}

Request models a new request to join a machine to the domain. This includes all data the Splice App may need to track the lifecycle of a request.

type Response

type Response struct {
	RequestID    string
	Status       string
	ErrorCode    server.StatusCode
	Hostname     string
	ResponseData []byte

	// Encryption
	ResponseKey []byte
	CipherNonce []byte
}

Response models the response to a client request, returned by the App to the CLI.

type StatusQuery

type StatusQuery struct {
	RequestID string
	ClientID  string

	GCEMetadata gce.Metadata
}

StatusQuery models a request for the status of a join.

Jump to

Keyboard shortcuts

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