postgres

package
v0.0.0-...-1c5c016 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 8 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 {
	// contains filtered or unexported fields
}

func NewFile

func NewFile(db *sqlx.DB) *File

func (File) GetByFolderID

func (f File) GetByFolderID(ctx context.Context, folderID string, sort types.Sort) (files []types.File, err error)

func (File) GetByID

func (f File) GetByID(ctx context.Context, id string) (ff types.File, err error)

func (File) IsExists

func (f File) IsExists(ctx context.Context, id string) (ok bool, err error)

func (File) MarkDelete

func (f File) MarkDelete(ctx context.Context, id []string) error

func (File) RemoveMeta

func (f File) RemoveMeta(ctx context.Context, id string) error

func (File) SaveMeta

func (f File) SaveMeta(ctx context.Context, file types.File) (created types.File, err error)

func (File) UpdateFolderID

func (f File) UpdateFolderID(ctx context.Context, id []string, folderID string) error

func (File) UpdateName

func (f File) UpdateName(ctx context.Context, id, name string) (updated types.File, err error)

type Folder

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

func NewFolder

func NewFolder(db *sqlx.DB) *Folder

func (Folder) Create

func (f Folder) Create(ctx context.Context, folder types.Folder) (ff types.Folder, err error)

func (Folder) Delete

func (f Folder) Delete(ctx context.Context, id string) error

func (Folder) ExistsByID

func (f Folder) ExistsByID(ctx context.Context, parentID string) (exists bool, err error)

func (Folder) ExistsByParentIDName

func (f Folder) ExistsByParentIDName(ctx context.Context, parentID *string, name string) (exists bool, err error)

func (Folder) Get

func (f Folder) Get(ctx context.Context, id string) (*types.Folder, error)

func (Folder) GetByParent

func (f Folder) GetByParent(ctx context.Context, parentID *string, sort types.Sort) (folders []*types.Folder, err error)

func (Folder) Update

func (f Folder) Update(ctx context.Context, folder types.Folder) (ff types.Folder, err error)

type Sort

type Sort struct {
	types.Sort
	// contains filtered or unexported fields
}

func NewSort

func NewSort(ss types.Sort, def columnsDef) Sort

func (Sort) OrderQuery

func (s Sort) OrderQuery(q string) string

Jump to

Keyboard shortcuts

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