Documentation
¶
Index ¶
- Variables
- type Service
- func (s *Service) GetStatement(ctx context.Context, name string, signature string) (*StatementFile, error)
- func (s *Service) GetStatementByName(ctx context.Context, name string) (*StatementFile, error)
- func (s *Service) SignedURL(ctx context.Context, in *StatementFile) string
- func (s *Service) UploadStatement(ctx context.Context, in *StatementFileReq) (*StatementFile, error)
- type StatementFile
- type StatementFileReq
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 (*Service) GetStatement ¶
func (*Service) GetStatementByName ¶
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 }
Click to show internal directories.
Click to hide internal directories.