powerscale

package
v0.0.0-...-af9f1ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreateBucketTraceName       = "CreateBucketRequest"
	DeleteBucketTraceName       = "DeleteBucketRequest"
	GrantBucketAccessTraceName  = "GrantBucketAccessRequest"
	RevokeBucketAccessTraceName = "RevokeBucketAccessRequest"
)

Variables

View Source
var (
	ErrInvalidBucketID           = errors.New("invalid bucketID")
	ErrFailedToCheckBucketExists = errors.New("failed to check bucket existence")
	ErrFailedToMarshalPolicy     = errors.New("failed to marshal policy into JSON")
	ErrFailedToCheckPolicyExists = errors.New("failed to check bucket policy existence")
	ErrFailedToCheckUserExists   = errors.New("failed to check for user existence")
	ErrInvalidRequest            = errors.New("incoming request invalid")
)

Functions

This section is empty.

Types

type ACL

type ACL struct {
	Grantee    *AclUser `json:"grantee"`
	Permission string   `json:"permission"`
}

type AclUser

type AclUser struct {
	Type string `json:"type,omitempty"`
	// ID string `json:"id,omitempty"`
	Name string `json:"name"`
}

type Bucket

type Bucket struct {
	Description     string `json:"description"`
	Acl             []ACL  `json:"acl"`
	ObjectACLPolicy string `json:"object_acl_policy"`
	CreatePath      bool   `json:"create_path"`
	Owner           string `json:"owner"`
	Path            string `json:"path"`
	Name            string `json:"name"`
}

type BucketList

type BucketList struct {
	Buckets []*Bucket `json:"buckets"`
	Total   int       `json:"total"`
}

type Key

type Key struct {
	AccessID  string `json:"access_id"`
	SecretKey string `json:"secret_key"`
}

type Keys

type Keys struct {
	Keys Key `json:"keys"`
}

type PartialBucket

type PartialBucket struct {
	Acl []ACL `json:"acl"`
}

type Server

type Server struct {
	Name       string
	S3Endpoint string
	S3Region   string
	// contains filtered or unexported fields
}

Server is implementation of driver.Driver interface for ObjectScale platform.

func New

func New(cfg *config.Config) *Server

func (*Server) CreateBucket

func (s *Server) CreateBucket(bucketName string) error

createBucket is used to create bucket on the Provisioner.

func (*Server) CreateKey

func (s *Server) CreateKey(userName string) (*iam.CreateAccessKeyOutput, error)

func (*Server) CreateUser

func (s *Server) CreateUser(userName string) error

func (*Server) DeleteACL

func (s *Server) DeleteACL(bucketName, userName string) error

func (*Server) DeleteBucket

func (s *Server) DeleteBucket(bucketName string) error

func (*Server) DeleteDirectoryForBucket

func (s *Server) DeleteDirectoryForBucket(bucketName string) error

func (*Server) DeleteKey

func (s *Server) DeleteKey(userName string) error

func (*Server) DeleteUser

func (s *Server) DeleteUser(userName string) error

func (*Server) EnsureACL

func (s *Server) EnsureACL(bucketName, userName, permission string) error

func (*Server) GetBucket

func (s *Server) GetBucket(bucketName string) (*Bucket, error)

getBucket is used to obtain bucket info from the Provisioner.

func (*Server) GetKey

func (s *Server) GetKey(userName string) (*Key, error)

func (*Server) GetUser

func (s *Server) GetUser(userName string) (*User, error)

type User

type User struct {
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
}

type UserList

type UserList struct {
	Users []*User `json:"users"`
	Total int     `json:"total"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL