Documentation ¶
Index ¶
- func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
- func GetEnv(env, fallback string) string
- func MakeError(w http.ResponseWriter, code int, domain string, message string, method string)
- type BackupReader
- type BackupSave
- type BackupStorage
- type BucketConfig
- type BucketStorage
- func (s *BucketStorage) Get(ctx context.Context, path string) (string, error)
- func (s *BucketStorage) List(ctx context.Context) <-chan string
- func (s *BucketStorage) Reader(ctx context.Context, path string) (io.ReadCloser, error)
- func (s *BucketStorage) Save(ctx context.Context, fileName string, reader io.Reader) (path string, err error)
- type Config
- type DocumentGet
- type DocumentSave
- type DocumentStorage
- type PostgresDatabaseConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeResponse ¶
func EncodeResponse(ctx context.Context, w http.ResponseWriter, response interface{}) error
Types ¶
type BackupReader ¶
type BackupSave ¶
type BackupStorage ¶
type BackupStorage interface { BackupSave BackupReader }
func NewBackupStorage ¶
func NewBackupStorage(storage *BucketStorage) BackupStorage
type BucketConfig ¶
type BucketStorage ¶
func NewBucketStorage ¶
func NewBucketStorage(config BucketConfig) *BucketStorage
func NewGCPBucketStorage ¶
func NewGCPBucketStorage(config BucketConfig) *BucketStorage
TODO redo this to pass in variables
func (*BucketStorage) Reader ¶
func (s *BucketStorage) Reader(ctx context.Context, path string) (io.ReadCloser, error)
type Config ¶
type Config struct { DatabaseType string PostgresConfig PostgresDatabaseConfig BucketConnectionConfig BucketConfig }
func LoadConfig ¶
func LoadConfig() Config
func (*Config) LoadBucketConfig ¶
func (c *Config) LoadBucketConfig() BucketConfig
func (*Config) LoadPostgresDatabaseConfig ¶
func (c *Config) LoadPostgresDatabaseConfig() PostgresDatabaseConfig
type DocumentGet ¶
type DocumentSave ¶
type DocumentStorage ¶
type DocumentStorage interface { DocumentSave DocumentGet }
func NewBucketDocumentStorage ¶
func NewBucketDocumentStorage(storage *BucketStorage) DocumentStorage
type PostgresDatabaseConfig ¶
type PostgresDatabaseConfig struct {
ConnectionString string
}
Click to show internal directories.
Click to hide internal directories.