Documentation
¶
Index ¶
- func InitializeS3Client(cfg *cfg.Config, username string) error
- func SplitPath(objectKey string) []string
- type S3Client
- func (s *S3Client) FetchAllPublicKeys() (*encryption.UserPublicKeyList, error)
- func (s *S3Client) FetchManifest() (*manifest.Manifest, string, error)
- func (s *S3Client) FetchObject(objectKey string) ([]byte, string, error)
- func (s *S3Client) InitializeManifest() error
- func (s *S3Client) PutObject(objectKey string, data []byte, eTag string) error
- func (s *S3Client) RegisterUser(publicKey []byte, username string) error
- func (s *S3Client) RemoveObjectFromManifest(objectKey string) error
- func (s *S3Client) UpdateManifest(manifestObj *manifest.Manifest, oldETag string) error
- func (s *S3Client) UploadAndUpdateManifest(objectKey string, data []byte, eTag string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeS3Client ¶
InitializeS3Client initializes the S3 client
Types ¶
type S3Client ¶
type S3Client struct {
// contains filtered or unexported fields
}
S3Client wraps the S3 client for convenience
func GetS3Client ¶
func GetS3Client() *S3Client
GetS3Client returns the s3 client instance if initialized, otherwise exits
func (*S3Client) FetchAllPublicKeys ¶
func (s *S3Client) FetchAllPublicKeys() (*encryption.UserPublicKeyList, error)
FetchAllPublicKeys fetches all users and their associated public keys based on the manifest
func (*S3Client) FetchManifest ¶
func (*S3Client) FetchObject ¶
FetchObject fetches an object from the S3 bucket using ETag for consistency
func (*S3Client) InitializeManifest ¶
InitializeManifest scans the S3 bucket and populates the manifest structure with files and directories
func (*S3Client) RegisterUser ¶
func (*S3Client) RemoveObjectFromManifest ¶
func (*S3Client) UpdateManifest ¶
Click to show internal directories.
Click to hide internal directories.