dao

package
v0.0.0-...-e309809 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 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 NewAttachment

func NewAttachment(db *sqlx.DB) repository.Attachment

func NewFavorite

func NewFavorite(db *sqlx.DB) repository.Favorite

func NewStatus

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

func NewTimeline

func NewTimeline(db *sqlx.DB) repository.Timeline

Types

type DBConfig

type DBConfig interface {
	FormatDSN() string
}

type Dao

type Dao interface {
	// Get Account repository
	Account() repository.Account

	// Get Status repository
	Status() repository.Status

	// Get Timeline repository
	Timeline() repository.Timeline

	// Get Attachment repository
	Attachment() repository.Attachment

	// Clear ALl date in DB
	InitAll() error

	// Get Like repository
	Favorite() repository.Favorite
}

func New

func New(config DBConfig) (Dao, error)

Jump to

Keyboard shortcuts

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