storage

package
v0.0.0-...-b49685a Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FILE = iota
	STREAM
	API
	DATABASE
	S3
	MEMORY
	HARDWARE
)

Variables

This section is empty.

Functions

func New

func New() *storageMongoAccessor

New creates a new instance of the storageMongoAccessor

Types

type StorageResource

type StorageResource struct {
	resource_model.AbstractResource // AbstractResource contains the basic fields of an object (id, name)
	resource_model.WebResource
	Type       StorageType `bson:"type,omitempty" json:"type,omitempty"`             // Type is the type of the storage
	Acronym    string      `bson:"acronym,omitempty" json:"acronym,omitempty"`       // Acronym is the acronym of the storage
	SizeType   StorageSize `bson:"size_type" json:"size_type" default:"0"`           // SizeType is the type of the storage size
	Size       uint        `bson:"size,omitempty" json:"size,omitempty"`             // Size is the size of the storage
	Local      bool        `bson:"local" json:"local"`                               // Local is a flag that indicates if the storage is local
	Encryption bool        `bson:"encryption,omitempty" json:"encryption,omitempty"` // Encryption is a flag that indicates if the storage is encrypted
	Redundancy string      `bson:"redundancy,omitempty" json:"redundancy,omitempty"` // Redundancy is the redundancy of the storage
	Throughput string      `bson:"throughput,omitempty" json:"throughput,omitempty"` // Throughput is the throughput of the storage
}

* StorageResource is a struct that represents a storage resource * it defines the resource storage

func (*StorageResource) Deserialize

func (dma *StorageResource) Deserialize(j map[string]interface{}) utils.DBObject

func (*StorageResource) GetAccessor

func (d *StorageResource) GetAccessor(caller *tools.HTTPCaller) utils.Accessor

func (*StorageResource) Serialize

func (dma *StorageResource) Serialize() map[string]interface{}

type StorageSize

type StorageSize int
const (
	GB StorageSize = iota
	MB
	KB
)

StorageType - Enum that defines the type of storage

func (StorageSize) ToArgo

func (dma StorageSize) ToArgo() string

New creates a new instance of the StorageResource struct

type StorageType

type StorageType int

enum of a data type

Jump to

Keyboard shortcuts

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