mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 19:14:23 +00:00
81974b977d
* fix: font color * fix: assets from iam when policy is default * fix: remove multiple files * fix mock storage * doc: add asset api * build assets docs * fix operator test * docs * fix remove assets from org label policy and not default * fix remove label policy assets and feature downgrade correctly * fix storage mock * Update docs/docs/apis/apis.md Co-authored-by: fabi <fabienne.gerschwiler@gmail.com> Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
27 lines
1.1 KiB
Go
27 lines
1.1 KiB
Go
package static
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
"net/url"
|
|
"time"
|
|
|
|
"github.com/caos/zitadel/internal/domain"
|
|
)
|
|
|
|
type Storage interface {
|
|
CreateBucket(ctx context.Context, name, location string) error
|
|
RemoveBucket(ctx context.Context, name string) error
|
|
ListBuckets(ctx context.Context) ([]*domain.BucketInfo, error)
|
|
PutObject(ctx context.Context, bucketName, objectName, contentType string, object io.Reader, objectSize int64, createBucketIfNotExisting bool) (*domain.AssetInfo, error)
|
|
GetObjectInfo(ctx context.Context, bucketName, objectName string) (*domain.AssetInfo, error)
|
|
GetObject(ctx context.Context, bucketName, objectName string) (io.Reader, func() (*domain.AssetInfo, error), error)
|
|
ListObjectInfos(ctx context.Context, bucketName, prefix string, recursive bool) ([]*domain.AssetInfo, error)
|
|
GetObjectPresignedURL(ctx context.Context, bucketName, objectName string, expiration time.Duration) (*url.URL, error)
|
|
RemoveObject(ctx context.Context, bucketName, objectName string) error
|
|
RemoveObjects(ctx context.Context, bucketName, path string, recursive bool) error
|
|
}
|
|
type Config interface {
|
|
NewStorage() (Storage, error)
|
|
}
|