mysql

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(dsn string) (*sqlx.DB, error)

func NewRepository

func NewRepository(db *sqlx.DB) repository.Repository

Types

type Proxy

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

func NewProxy

func NewProxy(db *sqlx.DB) *Proxy

func (*Proxy) Delete

func (p *Proxy) Delete(ctx context.Context, proxyID string) error

func (*Proxy) Get

func (p *Proxy) Get(ctx context.Context, proxyID string) (entity.Proxy, error)

func (*Proxy) Upsert

func (p *Proxy) Upsert(ctx context.Context, proxy entity.Proxy) error

type Route

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

func NewRoute

func NewRoute(db *sqlx.DB) *Route

func (*Route) Delete

func (r *Route) Delete(ctx context.Context, routes []entity.Route) error

func (*Route) GetWithProxyID

func (r *Route) GetWithProxyID(ctx context.Context, proxyID string) ([]entity.Route, error)

func (*Route) Upsert

func (r *Route) Upsert(ctx context.Context, routes []entity.Route) error

Jump to

Keyboard shortcuts

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