Documentation ¶
Index ¶
Constants ¶
View Source
const ( CtxPubSubKey = util.CtxKey("ctxPSKey") TopicQueue = "queue" )
View Source
const ( PermPublic = Perm("public") PermPrivate = Perm("private") PermTmp = Perm("tmp") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttrHandler ¶
type GcpConf ¶
type GcpConf struct { CredentialsFile string `yaml:"credentailsFile"` CredentailsUrl string `yaml:"credentailsUrl"` Bucket string PublicBucket string `yaml:"publicBucket"` TmpBucket string `yaml:"tmpBucket"` }
func (*GcpConf) NewStorage ¶ added in v1.5.2
type PubSub ¶
type PubSub interface { Publish(topicID string, msg []byte, attributes map[string]string) error Subcribe(sh SubHandler) Close() }
func GetPubSubByReq ¶
type Storage ¶
type Storage interface { GetAttr(ctx context.Context, key string, pm Perm) (*storage.ObjectAttrs, error) RemoveObject(ctx context.Context, key string, pm Perm) error GetDownloadUrl(ctx context.Context, key string, p Perm) (myurl string, err error) GetPublicUrl(ctx context.Context, object string) (myurl string, err error) WriteString(ctx context.Context, key string, content string, pm Perm) error Write(ctx context.Context, key string, pm Perm, writeData func(w io.Writer) error) (path string, err error) OpenFile(ctx context.Context, key string, pm Perm) (io.Reader, error) SignedURL(key string, contentType string, pm Perm, expDuration time.Duration) (url string, err error) GetAccessToken() (*oauth2.Token, error) }
type SubHandler ¶
Click to show internal directories.
Click to hide internal directories.