mysql

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobRecord

type BlobRecord struct {
	ID        string `gorm:"primarykey"`
	AccountId string `gorm:"column:account_id"`
	Path      string `gorm:"column:path;type:varchar(100);not null"`
}

func (*BlobRecord) BeforeCreate

func (b *BlobRecord) BeforeCreate(_ *gorm.DB) (err error)

BeforeCreate uses snowflake to generate an BlobID and path.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(db *gorm.DB) *Manager

NewManager creates a mysql manager.

func (*Manager) CreateBlobRecord

func (m *Manager) CreateBlobRecord(br *BlobRecord) error

func (*Manager) DeleteBlobRecord

func (m *Manager) DeleteBlobRecord(bid string) error

func (*Manager) GetBlobRecord

func (m *Manager) GetBlobRecord(bid string) (*BlobRecord, error)

Jump to

Keyboard shortcuts

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