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 ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliOSSConfig ¶
type AzureConfig ¶
type AzureConfig struct { AccountName string `yaml:"account_name"` // (env AZURE_STORAGE_ACCOUNT) AccountKey string `yaml:"account_key"` // (env AZURE_STORAGE_KEY) ContainerName string `yaml:"container_name"` TokenCredential azblob.TokenCredential `yaml:"-"` // required for presigned url generation }
type GCPConfig ¶
type GCPConfig struct { CredentialsJSON string `yaml:"credentials_json"` // (env GOOGLE_APPLICATION_CREDENTIALS) Bucket string `yaml:"bucket"` ProxyConfig *ProxyConfig `yaml:"proxy_config"` }
type ProxyConfig ¶
type S3Config ¶
type S3Config struct { AccessKey string `yaml:"access_key"` Secret string `yaml:"secret"` SessionToken string `yaml:"session_token"` AssumeRoleArn string `yaml:"assume_role_arn"` // ARN of the role to assume for file upload. Egress will make an AssumeRole API call using the provided access_key and secret to assume that role AssumeRoleExternalId string `yaml:"assume_role_external_id"` // ExternalID to use when assuming role for upload Region string `yaml:"region"` Endpoint string `yaml:"endpoint"` Bucket string `yaml:"bucket"` ForcePathStyle bool `yaml:"force_path_style"` ProxyConfig *ProxyConfig `yaml:"proxy_config"` MaxRetries int `yaml:"max_retries"` MaxRetryDelay time.Duration `yaml:"max_retry_delay"` MinRetryDelay time.Duration `yaml:"min_retry_delay"` Metadata map[string]string `yaml:"metadata"` Tagging string `yaml:"tagging"` ContentDisposition string `yaml:"content_disposition"` }
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) 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) Delete(storagePath string) error }
func NewAliOSS ¶
func NewAliOSS(conf *AliOSSConfig) (Storage, error)
func NewAzure ¶
func NewAzure(conf *AzureConfig) (Storage, error)
Click to show internal directories.
Click to hide internal directories.