dao

package
v0.0.0-...-4151d87 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccount

func NewAccount(db *sqlx.DB) repository.Account

func NewMediaAttachment

func NewMediaAttachment(db *sqlx.DB) repository.MediaAttachment

func NewStatus

func NewStatus(db *sqlx.DB) repository.Status

Types

type DBConfig

type DBConfig interface {
	FormatDSN() string
}

Interface of configureation

type Dao

type Dao interface {
	Account() repository.Account
	Status() repository.Status
	MediaAttachment() repository.MediaAttachment

	// Clear all data in DB
	InitAll() error
}

DAO interface

func New

func New(config DBConfig) (Dao, error)

Create DAO

Jump to

Keyboard shortcuts

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