common

package
v2.19.6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeOpaqueMap

func DecodeOpaqueMap(opaque *types.Opaque) map[string]string

DecodeOpaqueMap decodes a Reva opaque object into a map of strings.

func EncodeOpaqueMap

func EncodeOpaqueMap(opaque *types.Opaque, m map[string]string)

EncodeOpaqueMap encodes a map of strings into a Reva opaque entry. Only plain encoding is currently supported.

func FindString

func FindString(a []string, x string) int

FindString performs a case-sensitive string search in a string vector and returns its index or -1 if it couldn't be found.

func FindStringNoCase

func FindStringNoCase(a []string, x string) int

FindStringNoCase performs a case-insensitive string search in a string vector and returns its index or -1 if it couldn't be found.

func GetValuesFromOpaque

func GetValuesFromOpaque(opaque *types.Opaque, keys []string, mandatory bool) (map[string]string, error)

GetValuesFromOpaque extracts the given keys from the opaque object. If mandatory is set to true, all specified keys must be available in the opaque object.

Types

type DataDescriptor

type DataDescriptor struct {
	// contains filtered or unexported fields
}

DataDescriptor implements os.FileInfo to provide file information for non-file data objects. This is used, for example, when uploading data that doesn't come from a local file.

func CreateDataDescriptor

func CreateDataDescriptor(name string, size int64) DataDescriptor

CreateDataDescriptor creates a new descriptor for non-file data objects.

func (*DataDescriptor) IsDir

func (ddesc *DataDescriptor) IsDir() bool

IsDir always returns false.

func (*DataDescriptor) ModTime

func (ddesc *DataDescriptor) ModTime() time.Time

ModTime always returns the current time as the modification time.

func (*DataDescriptor) Mode

func (ddesc *DataDescriptor) Mode() os.FileMode

Mode always returns a 0700 file mode.

func (*DataDescriptor) Name

func (ddesc *DataDescriptor) Name() string

Name returns the quasi-filename of this object.

func (*DataDescriptor) Size

func (ddesc *DataDescriptor) Size() int64

Size returns the specified data size.

func (*DataDescriptor) Sys

func (ddesc *DataDescriptor) Sys() interface{}

Sys returns nil, as this object doesn't represent a system object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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