Versions in this module Expand all Collapse all v1 v1.0.0 Nov 7, 2021 Changes in this version + const CtxPubSubKey + const PermPrivate + const PermPublic + const PermTmp + const TopicQueue + type AttrHandler interface + GetAttr func() map[string]string + Handler func(msg *pubsub.Message) + type GcpConf struct + Bucket string + CredentialsFile string + PublicBucket string + TmpBucket string + func (conf *GcpConf) NewPubSub(ctx context.Context, l log.Logger) PubSub + func (gcp *GcpConf) GetAttr(ctx context.Context, key string, pm Perm) (*storage.ObjectAttrs, error) + func (gcp *GcpConf) GetPublicUrl(ctx context.Context, key string) (myurl string, err error) + func (gcp *GcpConf) OpenFile(ctx context.Context, key string, pm Perm) (io.Reader, error) + func (gcp *GcpConf) RemoveObject(ctx context.Context, key string, pm Perm) error + func (gcp *GcpConf) SignedURL(key string, contentType string, pm Perm, expDuration time.Duration) (url string, err error) + func (gcp *GcpConf) Write(ctx context.Context, key string, pm Perm, writeData func(w io.Writer) error) (path string, err error) + func (gcp *GcpConf) WriteString(ctx context.Context, key string, content string, pm Perm) error + type Perm string + type PubSub interface + Close func() + Publish func(topicID string, msg []byte, attributes map[string]string) error + Subcribe func(sh SubHandler) + func GetPubSubByReq(req *http.Request) PubSub + type PubSubConf interface + NewPubSub func(ctx context.Context, l log.Logger) PubSub + type Storage interface + GetAttr func(ctx context.Context, key string, pm Perm) (*storage.ObjectAttrs, error) + GetPublicUrl func(ctx context.Context, object string) (myurl string, err error) + OpenFile func(ctx context.Context, key string, pm Perm) (io.Reader, error) + RemoveObject func(ctx context.Context, key string, pm Perm) error + SignedURL func(key string, contentType string, pm Perm, expDuration time.Duration) (url string, err error) + Write func(ctx context.Context, key string, pm Perm, writeData func(w io.Writer) error) (path string, err error) + WriteString func(ctx context.Context, key string, content string, pm Perm) error + type SubHandler interface + GetSubID func() string + Handler func(msg *pubsub.Message)