service

package
v0.0.6-0...-417b642 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DB_FILE = "service.db?_fk=1"
View Source
const TA_DOMAIN_NAME = "RA_WEBS_TA_DOMAIN"
View Source
const TOKEN_NAME = "RA_WEBS_SERVICE_TOKEN"

Variables

View Source
var (
	ErrNoToken        = errors.New("no token")
	ErrNoDomain       = errors.New("no domain")
	ErrNoATPrivateKey = errors.New("not private key")
	ErrFailedToOpenDB = errors.New("failed to open DB")
	ErrCreateSchema   = errors.New("failed to create schema")
	ErrCreateAudit    = errors.New("failed to create audit")
)

Functions

This section is empty.

Types

type DB

type DB struct {
	Client *ent.Client
	Ctx    *context.Context
}

func NewDB

func NewDB(dbConfig *DBConfig) (*DB, error)

func (*DB) Close

func (db *DB) Close()

type DBConfig

type DBConfig struct {
	Type   string
	Config string
}

type Service

type Service struct {
	Domain string
	DB     *DB
	Token  string
}

func Default

func Default() (*Service, error)

Directories

Path Synopsis
api
io
ent
ta

Jump to

Keyboard shortcuts

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