service

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package service manages the main logic of server.

Package service manages the main logic of server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQL

type MySQL interface {
	Connect(ctx context.Context) error
	Close(ctx context.Context) error
	GetVector(ctx context.Context, uuid string) (*model.Vector, error)
	GetIPs(ctx context.Context, uuid string) ([]string, error)
	SetVector(ctx context.Context, vector *model.Vector) error
	SetVectors(ctx context.Context, vectors ...*model.Vector) error
	DeleteVector(ctx context.Context, uuid string) error
	DeleteVectors(ctx context.Context, uuids ...string) error
	SetIPs(ctx context.Context, uuid string, ips ...string) error
	RemoveIPs(ctx context.Context, ips ...string) error
}

func New

func New(opts ...Option) (ms MySQL, err error)

type Option added in v0.0.51

type Option func(*client) error

func WithMySQLClient added in v0.0.51

func WithMySQLClient(m mysql.MySQL) Option

Jump to

Keyboard shortcuts

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