database

package
v0.0.0-...-06d85a1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	// GetEngineType get the database type (e.g. postgres, memory, etc.).
	GetEngineType() string

	// Close the database connection.
	Close() error

	// IsReady - Check if database is ready
	IsReady(ctx context.Context) (bool, error)
}

Database - Db interface

type Engine

type Engine string

Engine - Type declaration of engine

const (
	POSTGRES Engine = "postgres"
	MEMORY   Engine = "memory"
)

func (Engine) String

func (c Engine) String() string

String - Convert to string

type Pagination

type Pagination struct {
	// contains filtered or unexported fields
}

Pagination -

func NewPagination

func NewPagination(opts ...PaginationOption) Pagination

NewPagination -

func (Pagination) Page

func (p Pagination) Page() uint32

Page -

func (Pagination) Size

func (p Pagination) Size() uint32

Size -

type PaginationOption

type PaginationOption func(*Pagination)

PaginationOption - Option type

func Page

func Page(page uint32) PaginationOption

Page -

func Size

func Size(size uint32) PaginationOption

Size -

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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