Documentation
¶
Overview ¶
Copyright 2025 LiveKit, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- type AliOSSConfig
- type AzureConfig
- type Config
- type ErrorWithStatusCode
- type GCPConfig
- type LocalConfig
- type OCIConfig
- type ProxyConfig
- type S3Config
- type S3Logger
- type Storage
- func New(conf Config) (Storage, error)
- func NewAliOSS(conf *AliOSSConfig) (Storage, error)
- func NewAzure(conf *AzureConfig) (Storage, error)
- func NewGCP(conf *GCPConfig) (Storage, error)
- func NewLocal(conf *LocalConfig) (Storage, error)
- func NewOCI(conf *OCIConfig) (Storage, error)
- func NewS3(conf *S3Config) (Storage, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliOSSConfig ¶
type AliOSSConfig = config.AliOSSConfig
The config structs live in the storage/config package so that consumers which only embed them in their own config (and never create a Storage) don't pull in every provider SDK. These aliases keep the existing API.
type AzureConfig ¶
type AzureConfig = config.AzureConfig
The config structs live in the storage/config package so that consumers which only embed them in their own config (and never create a Storage) don't pull in every provider SDK. These aliases keep the existing API.
type Config ¶
The config structs live in the storage/config package so that consumers which only embed them in their own config (and never create a Storage) don't pull in every provider SDK. These aliases keep the existing API.
type ErrorWithStatusCode ¶
func (*ErrorWithStatusCode) Error ¶
func (e *ErrorWithStatusCode) Error() string
func (*ErrorWithStatusCode) Unwrap ¶
func (e *ErrorWithStatusCode) Unwrap() error
type GCPConfig ¶
The config structs live in the storage/config package so that consumers which only embed them in their own config (and never create a Storage) don't pull in every provider SDK. These aliases keep the existing API.
type LocalConfig ¶
type LocalConfig = config.LocalConfig
The config structs live in the storage/config package so that consumers which only embed them in their own config (and never create a Storage) don't pull in every provider SDK. These aliases keep the existing API.
type OCIConfig ¶
The config structs live in the storage/config package so that consumers which only embed them in their own config (and never create a Storage) don't pull in every provider SDK. These aliases keep the existing API.
type ProxyConfig ¶
type ProxyConfig = config.ProxyConfig
The config structs live in the storage/config package so that consumers which only embed them in their own config (and never create a Storage) don't pull in every provider SDK. These aliases keep the existing API.
type S3Config ¶
The config structs live in the storage/config package so that consumers which only embed them in their own config (and never create a Storage) don't pull in every provider SDK. These aliases keep the existing API.
type S3Logger ¶
type S3Logger struct {
// contains filtered or unexported fields
}
S3Logger only logs aws messages on upload failure
func NewS3Logger ¶
func NewS3Logger() *S3Logger
type Storage ¶
type Storage interface {
UploadData(data []byte, storagePath, contentType string) (location string, size int64, err error)
UploadFile(filepath, storagePath, contentType string) (location string, size int64, err error)
ListObjects(prefix string) ([]string, error)
DownloadData(storagePath string) (data []byte, err error)
DownloadFile(filepath, storagePath string) (size int64, err error)
GeneratePresignedUrl(storagePath string, expiration time.Duration) (url string, err error)
DeleteObject(storagePath string) error
DeleteObjects(storagePaths []string) error
}
func NewAliOSS ¶
func NewAliOSS(conf *AliOSSConfig) (Storage, error)
func NewAzure ¶
func NewAzure(conf *AzureConfig) (Storage, error)
func NewLocal ¶
func NewLocal(conf *LocalConfig) (Storage, error)