Versions in this module Expand all Collapse all v0 v0.0.4 Jul 9, 2022 Changes in this version + var File_blob_blob_proto protoreflect.FileDescriptor + var ProviderSet = wire.NewSet(NewFactory) + func NewAfs(fs afero.Fs) *afero.Afero + func PatchOpt(cfg BlobConfig, fs afero.Fs) afero.Fs + func Register(name string, f func(cfg BlobConfig) Blob) + type Blob interface + GenerateInternalUrl func(name string) (string, error) + GeneratePreSignedURL func(name string, expire time.Duration) (string, error) + GeneratePublicUrl func(name string) (string, error) + GetAfero func() *afero.Afero + type BlobConfig struct + BasePath string + InternalUrl string + Os *BlobProviderOs + Provider string + PublicUrl string + ReadOnly bool + RegexFilter string + S3 *BlobProviderS3 + func (*BlobConfig) Descriptor() ([]byte, []int) + func (*BlobConfig) ProtoMessage() + func (x *BlobConfig) GetBasePath() string + func (x *BlobConfig) GetInternalUrl() string + func (x *BlobConfig) GetOs() *BlobProviderOs + func (x *BlobConfig) GetProvider() string + func (x *BlobConfig) GetPublicUrl() string + func (x *BlobConfig) GetReadOnly() bool + func (x *BlobConfig) GetRegexFilter() string + func (x *BlobConfig) GetS3() *BlobProviderS3 + func (x *BlobConfig) ProtoReflect() protoreflect.Message + func (x *BlobConfig) Reset() + func (x *BlobConfig) String() string + type BlobFile struct + Id string + Metadata *structpb.Struct + Mime string + Name string + Size int64 + Url string + func (*BlobFile) Descriptor() ([]byte, []int) + func (*BlobFile) ProtoMessage() + func (x *BlobFile) GetId() string + func (x *BlobFile) GetMetadata() *structpb.Struct + func (x *BlobFile) GetMime() string + func (x *BlobFile) GetName() string + func (x *BlobFile) GetSize() int64 + func (x *BlobFile) GetUrl() string + func (x *BlobFile) ProtoReflect() protoreflect.Message + func (x *BlobFile) Reset() + func (x *BlobFile) String() string + type BlobProviderOs struct + Dir *wrapperspb.StringValue + func (*BlobProviderOs) Descriptor() ([]byte, []int) + func (*BlobProviderOs) ProtoMessage() + func (x *BlobProviderOs) GetDir() *wrapperspb.StringValue + func (x *BlobProviderOs) ProtoReflect() protoreflect.Message + func (x *BlobProviderOs) Reset() + func (x *BlobProviderOs) String() string + type BlobProviderS3 struct + Bucket string + Key string + Region string + Secret string + func (*BlobProviderS3) Descriptor() ([]byte, []int) + func (*BlobProviderS3) ProtoMessage() + func (x *BlobProviderS3) GetBucket() string + func (x *BlobProviderS3) GetKey() string + func (x *BlobProviderS3) GetRegion() string + func (x *BlobProviderS3) GetSecret() string + func (x *BlobProviderS3) ProtoReflect() protoreflect.Message + func (x *BlobProviderS3) Reset() + func (x *BlobProviderS3) String() string + type Config map[string]*BlobConfig + type Factory interface + Get func(ctx context.Context, name string, tenancy bool) Blob + func NewFactory(cfg Config) Factory + type FactoryImpl struct + func (f *FactoryImpl) Get(ctx context.Context, name string, tenancy bool) Blob + type FileBlob struct + BasePath string + PublicUrl string + func NewFileBlob(a *afero.Afero, basePath, publicUrl string) *FileBlob + func (f *FileBlob) GenerateInternalUrl(name string) (string, error) + func (f *FileBlob) GeneratePreSignedURL(name string, expire time.Duration) (string, error) + func (f *FileBlob) GeneratePublicUrl(name string) (string, error) + func (f *FileBlob) GetAfero() *afero.Afero