structcup

package
v1.15.10 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Description: This package contains the structures to be imported and used by other packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResponse

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

AuthResponse represents the response from an authentication operation.

It includes a message and user information.

type ErrorResponse

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

ErrorResponse represents a standard error response from the application.

It includes an error code and a message.

type GoogleLogEntry

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

GoogleLogEntry represents a log entry for Google's logging service.

It includes a message, trace, and component information.

type HTTPResponse added in v1.13.7

type HTTPResponse struct {
	Resp *http.Response
	Err  error
}

HTTPResponse holds the response and error from an HTTP request.

type PaginationOpts

type PaginationOpts struct {
	PageNumber int
	PageSize   int
}

PaginationOpts represents the options for pagination.

It includes a page number and a page size.

type QueryParam

type QueryParam struct {
	Key                   string
	Value                 string
	MultipleValuesAllowed bool
}

QueryParam represents a query parameter.

It contains a boolean to indicate if multiple values are allowed for a same key.

type ResponseData

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

ResponseData represents a standard response from the application.

It includes a message and an ID.

type SearchResponse

type SearchResponse struct {
	Results     []interface{} `json:"results"`
	TotalCount  int32         `json:"total_count"`
	CurrentPage int           `json:"current_page"`
	LastPage    int           `json:"last_page"`
}

SearchResponse represents the response from a search operation.

It includes results, total count, current page, and last page.

type TextSearch

type TextSearch struct {
	IndexName string
	Query     string
	Fields    []string
}

TextSearch represents a text search operation.

It includes an index name, a query, and fields to search in.

Jump to

Keyboard shortcuts

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