document

package
v0.0.0-...-4db56dd Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	ID       int    `db:"id" json:"id"`
	Name     string `db:"name" json:"name"`
	FileName string `db:"file_name" json:"file_name"`
}

type Store

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

Store stores the dependencies

func NewDocumentRepo

func NewDocumentRepo(db *sqlx.DB) *Store

NewDocumentRepo stores our dependency

func (*Store) AddDocument

func (s *Store) AddDocument(ctx context.Context, documentParam Document) (Document, error)

func (*Store) DeleteDocument

func (s *Store) DeleteDocument(ctx context.Context, documentParam Document) error

func (*Store) GetDocument

func (s *Store) GetDocument(ctx context.Context, documentParam Document) (Document, error)

func (*Store) GetDocuments

func (s *Store) GetDocuments(ctx context.Context) ([]Document, error)

Jump to

Keyboard shortcuts

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