types

package
v0.0.0-...-53883ab Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidClientId   = &Error{Status: 401, Message: "The client Id is invalid or missing. Use a valid client Id or use an auto generated client Id in the connection request."}
	ErrClientIdForbidden = &Error{Status: 403, Message: "The request was invalid, use primary client Id to request a secondary client Id."}
	ErrTimteout          = &Error{Status: 504, Message: "The network connection timeout."}
	ErrUnauthorized      = &Error{Status: 401, Message: "The security key provided is not authorized to perform this operation."}
	ErrBadRequest        = &Error{Status: 400, Message: "The request was invalid or cannot be otherwise served."}
	ErrForbidden         = &Error{Status: 403, Message: "The request is understood, but it has been refused or access is not allowed."}
	ErrBadToken          = &Error{Status: 403, Message: "Authentication failed."}
	ErrUnknownEpoch      = &Error{Status: 403, Message: "Unknown authentication epoch."}
	ErrNotFound          = &Error{Status: 404, Message: "The resource requested does not exist."}
	ErrServerError       = &Error{Status: 500, Message: "An unexpected condition was encountered."}
	ErrNotImplemented    = &Error{Status: 501, Message: "The server does not recognize the request method."}
	ErrTargetTooLong     = &Error{Status: 400, Message: "Topic can not have more than 23 parts."}
)

Represents a set of errors used in the handlers.

Functions

This section is empty.

Types

type ClientIdResponse

type ClientIdResponse struct {
	Status   int    `json:"status"`
	ClientId string `json:"key"`
}

type Error

type Error struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
	ID      int    `json:"id,omitempty"`
}

Error represents an event code which provides a more details.

func (*Error) Error

func (e *Error) Error() string

Error implements error interface.

type KeyGenRequest

type KeyGenRequest struct {
	Topic string `json:"topic"`
	Type  string `json:"type"`
}

func (*KeyGenRequest) Access

func (m *KeyGenRequest) Access() uint32

type KeyGenResponse

type KeyGenResponse struct {
	Status int    `json:"status"`
	Key    string `json:"key"`
	Topic  string `json:"topic"`
}

Jump to

Keyboard shortcuts

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