types

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResponse added in v1.2.0

type AuthResponse struct {
	Message string                 `json:"message"`
	User    map[string]interface{} `json:"user"`
}

AuthResponse is a struct representing the response from the authentication endpoint.

type ErrorResponse

type ErrorResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

ErrorResponse is the model for an error response. The Code field is the HTTP status code. The Message field is the error message. This is useful for returning error responses in JSON format for REST APIs.

type GoogleLogEntry

type GoogleLogEntry struct {
	Message   string `json:"message"`
	Trace     string `json:"logging.googleapis.com/trace,omitempty"`
	Component string `json:"component,omitempty"`
}

GoogleLogEntry is the model for a Google Cloud Logging entry. See https://github.com/GoogleCloudPlatform/golang-samples/blob/HEAD/run/logging-manual/main.go for more details. Severity field is omitted because it is set by the logger adapter method utilized, for example, Info, Error, etc.

type Pool added in v1.1.3

type Pool struct {
	WorkerChan chan Worker    // Responsible for conccurency limiting
	WaitGroup  sync.WaitGroup // Responsible for syncronisation of multiple workers
}

Pool is a struct representing a worker pool.

type ResponseData

type ResponseData struct {
	Message string `json:"message"`
	ID      string `json:"id"`
}

ResponseData is a struct that represents a response sent to the client.

type Validator added in v1.3.0

type Validator func(string, reflect.Value, string) error

type Worker added in v1.1.0

type Worker struct{}

Worker is an abstraction for an empty struct reprensenting a worker.

Jump to

Keyboard shortcuts

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