models

package
v0.0.0-...-db5d640 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	gorm.Model
	Filename string `gorm:"not null"`
	FileBlob []byte `gorm:"not null"`
}

type FileDB

type FileDB interface {
	Find(id int) (*File, error)
	Create(file *File) error
	Delete(id int) error
	GetAll() ([]*File, error)
}

type FileService

type FileService struct {
	FileDB
}

func NewFileService

func NewFileService(db *gorm.DB) FileService

type Services

type Services struct {
	File FileService
	// contains filtered or unexported fields
}

func NewServices

func NewServices(connectionInfo string) *Services

func (*Services) AutoMigrate

func (s *Services) AutoMigrate() error

Will attempt to automigrate all database tables

Jump to

Keyboard shortcuts

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