dao

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(user string, pwd string) auth

Auth creates the authentication options for persistance service nolint: revive

func Opts

func Opts(prefix string) *opts

Opts creates the options for persistance service nolint: revive

func Server

func Server(host string, port int16, db string) server

Server creates the datastore (click house) options nolint: revive

Types

type DAO

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

DAO is data access object for clickhouse database

func New

func New(s server, a auth, opts *opts) (*DAO, error)

New creates persistance service nolint: revive

func (*DAO) Migrate

func (p *DAO) Migrate() error

Migrate applies all pending database migrations

func (*DAO) Save

func (p *DAO) Save(data string) error

Save stores data into table in clickhouse database

Jump to

Keyboard shortcuts

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