Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentTypeInList ¶
func ModuleConfigSkeletons ¶
func ModuleConfigSkeletons() map[string]interface{}
func ModuleNames ¶
func ModuleNames() []string
func RegisterModule ¶
Types ¶
type Config ¶
type Config struct { //TODO: declare the encoding (hex?) NameGenerationKey string `env:"FILENAME_GENERATION_KEY"` StoreService string `env:"STORE_SERVICE"` Modules map[string]interface{} `env:",map,squash"` ImagesBaseURL string `env:"IMAGES_BASE_URL"` }
Config File Core cofiguration
func ConfigFromEnv ¶
ConfigFromEnv populate the configuration by looking up the environment variables.
func ConfigSkeleton ¶
func ConfigSkeleton() Config
type Module ¶
type Module struct { // ServiceConfigSkeleton returns an instance of config used to initialize // the service. This skeleton contains a config structure. ServiceConfigSkeleton func() ServiceConfig // NewService create a storage service backend connection. This is // usually initialize the client of the object storage. NewService func(config ServiceConfig) (Service, error) }
Module contains attributes which describe a storage module.
type Service ¶
type Service interface {
PutObject(objectKey string, content io.Reader) (publicURL string, err error)
}
func NewServiceClient ¶
type ServiceConfig ¶
type ServiceConfig interface{}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store contains business logic of a file service.
func (*Store) GenerateName ¶
GenerateName is used to generate a name, for file name or other identifier, based on the content. It utilizes hash so the result could be used to prevent duplicates when storing the media object.
Click to show internal directories.
Click to hide internal directories.