rgw

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2018 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	RGWErrorNone     = iota
	RGWErrorUnknown  = iota
	RGWErrorNotFound = iota
	RGWErrorBadData  = iota
	RGWErrorParse    = iota
)

Variables

This section is empty.

Functions

func CreateObjectStore

func CreateObjectStore(context *Context, metadataSpec, dataSpec model.Pool, serviceIP string, port int32) error

func DeleteBucket

func DeleteBucket(c *Context, bucketName string, purge bool) (int, error)

func DeleteObjectStore

func DeleteObjectStore(context *Context) error

func DeleteUser

func DeleteUser(c *Context, id string) (string, int, error)

func GetBucketsStats

func GetBucketsStats(c *Context) (map[string]ObjectBucketStats, error)

func GetMimeTypesPath added in v0.9.0

func GetMimeTypesPath(configDir string) string

func GetObjectStores

func GetObjectStores(context *Context) ([]string, error)

func Initialize added in v0.9.0

func Initialize(context *clusterd.Context, config *Config) error

func ListUsers

func ListUsers(c *Context) ([]string, int, error)

Types

type Config

type Config struct {
	Name            string
	Host            string
	Port            int
	SecurePort      int
	Keyring         string
	CertificatePath string
	ClusterInfo     *cephconfig.ClusterInfo
}

type Context

type Context struct {
	Name        string
	ClusterName string
	// contains filtered or unexported fields
}

func NewContext

func NewContext(context *clusterd.Context, name, clusterName string) *Context

type ObjectBucket added in v0.8.0

type ObjectBucket struct {
	Name string `json:"name"`
	ObjectBucketMetadata
	ObjectBucketStats
}

func GetBucket

func GetBucket(c *Context, bucket string) (*ObjectBucket, int, error)

func ListBuckets

func ListBuckets(c *Context) ([]ObjectBucket, error)

type ObjectBucketMetadata added in v0.8.0

type ObjectBucketMetadata struct {
	Owner     string    `json:"owner"`
	CreatedAt time.Time `json:"createdAt"`
}

type ObjectBucketStats added in v0.8.0

type ObjectBucketStats struct {
	Size            uint64 `json:"size"`
	NumberOfObjects uint64 `json:"numberOfObjects"`
}

func GetBucketStats

func GetBucketStats(c *Context, bucketName string) (*ObjectBucketStats, bool, error)

type ObjectBuckets added in v0.8.0

type ObjectBuckets []ObjectBucket

func (ObjectBuckets) Len added in v0.8.0

func (slice ObjectBuckets) Len() int

func (ObjectBuckets) Less added in v0.8.0

func (slice ObjectBuckets) Less(i, j int) bool

func (ObjectBuckets) Swap added in v0.8.0

func (slice ObjectBuckets) Swap(i, j int)

type ObjectUser added in v0.8.0

type ObjectUser struct {
	UserID      string  `json:"userId"`
	DisplayName *string `json:"displayName"`
	Email       *string `json:"email"`
	AccessKey   *string `json:"accessKey"`
	SecretKey   *string `json:"secretKey"`
}

func CreateUser

func CreateUser(c *Context, user ObjectUser) (*ObjectUser, int, error)

func GetUser

func GetUser(c *Context, id string) (*ObjectUser, int, error)

func UpdateUser

func UpdateUser(c *Context, user ObjectUser) (*ObjectUser, int, error)

Jump to

Keyboard shortcuts

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