statement

package
v0.0.0-...-58f0064 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStatementFileNotFound = errors.New("statement file not found")

ErrStatementFileNotFound is returned when a statement file is not found in the database.

View Source
var ErrUnsupportedFileType = errors.New("unsupported file type")

ErrUnsupportedFileType is returned when the file type is not supported.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(_ context.Context, db *sql.DB, zlog *zap.Logger) (*Service, error)

func (*Service) GetStatement

func (s *Service) GetStatement(ctx context.Context, name string, signature string) (*StatementFile, error)

func (*Service) GetStatementByName

func (s *Service) GetStatementByName(ctx context.Context, name string) (*StatementFile, error)

func (*Service) SignedURL

func (s *Service) SignedURL(ctx context.Context, in *StatementFile) string

func (*Service) UploadStatement

func (s *Service) UploadStatement(ctx context.Context, in *StatementFileReq) (*StatementFile, error)

type StatementFile

type StatementFile struct {
	ID           int64     `json:"-"`
	Location     string    `json:"-"`
	OriginalName string    `json:"originalName"`
	Name         string    `json:"name"`
	CreatedBy    string    `json:"createdBy"`
	CreatedAt    time.Time `json:"createdAt"`

	// Public URL is the signed url to download the file.
	// For output at first time only, not save to DB.
	PublicURL string `json:"publicUrl,omitempty"`
}

type StatementFileReq

type StatementFileReq struct {
	OriginalName string
	ReadSeeker   io.ReadSeeker
}

Jump to

Keyboard shortcuts

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