api

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const STANDARD_VERSION string = "2.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type APIRequest added in v0.9.0

type APIRequest struct {
	http.Request
	// contains filtered or unexported fields
}

func (*APIRequest) GetUUID added in v0.10.0

func (comm *APIRequest) GetUUID() (string, error)

func (*APIRequest) Prepare added in v0.9.0

func (req *APIRequest) Prepare(signer *crypto.Signer, meta *Metadata, body []byte) error

Prepares (and effectively finalizes) a request.

func (*APIRequest) Respond added in v0.9.0

func (req *APIRequest) Respond(signer *crypto.Signer, meta *Metadata, body []byte) (*APIResponse, error)

func (*APIRequest) Verify added in v0.9.0

func (req *APIRequest) Verify(signer *crypto.Signer) (bool, error)

type APIResponse added in v0.9.0

type APIResponse struct {
	http.Response
	// contains filtered or unexported fields
}

func (*APIResponse) GetUUID added in v0.10.0

func (comm *APIResponse) GetUUID() (string, error)

func (*APIResponse) Prepare added in v0.9.0

func (res *APIResponse) Prepare(signer *crypto.Signer, meta *Metadata, body []byte) error

func (*APIResponse) Verify added in v0.9.0

func (res *APIResponse) Verify(signer *crypto.Signer, req *APIRequest) (bool, error)

type ApiHeader

type ApiHeader string
const (
	SIGNATURE_PUBKEY ApiHeader = "X-API-SIG-PUB"
	SIGNATURE        ApiHeader = "X-API-SIG"
	VERSION          ApiHeader = "X-API-VER"
	PROJECT          ApiHeader = "X-API-PROJ"
	STANDARD         ApiHeader = "X-API-STD"
	REQUEST_UUID     ApiHeader = "X-API-UUID"
)

type FlowViolation added in v0.10.1

type FlowViolation error

type IncompatibleModeError added in v0.10.1

type IncompatibleModeError error

type LifecycleViolation added in v0.10.1

type LifecycleViolation error

type Metadata

type Metadata struct {
	Version   string
	ProjectID uint64
}

API Metadata

type ProtocolViolation added in v0.10.1

type ProtocolViolation error

type StandardMismatch added in v0.10.1

type StandardMismatch error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳