model

package
v0.0.0-...-ca3ac9b Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobDescription

type BlobDescription struct {
	StoreID       string `yaml:"storeid" json:"storeid"`
	ContentLength int64  `yaml:"contentLength" json:"contentLength"`
	ContentType   string `yaml:"contentType" json:"contentType"`
	CreationDate  int64  `yaml:"creationDate" json:"creationDate"`
	Filename      string `yaml:"filename" json:"filename"`
	TenantID      string `yaml:"tenantID" json:"tenantID"`
	BlobID        string `yaml:"blobID" json:"blobID"`
	LastAccess    int64  `yaml:"lastAccess" json:"lastAccess"`
	Retention     int64  `yaml:"retention" json:"retention"`
	BlobURL       string `yaml:"blobUrl" json:"blobUrl"`
	Hash          string `yaml:"hash" json:"hash"`
	Check         *Check `yaml:"check,omitempty" json:"check,omitempty"`
	Properties    map[string]any
}

BlobDescription model for a blob description

func (BlobDescription) Map

func (b BlobDescription) Map() map[string]any

Map converting the blob description to a simple map

func (BlobDescription) MarshalJSON

func (b BlobDescription) MarshalJSON() ([]byte, error)

MarshalJSON marshall this to JSON

func (*BlobDescription) UnmarshalJSON

func (b *BlobDescription) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshall this from JSON

type Check

type Check struct {
	Store   *CheckInfo `yaml:"store,omitempty" json:"store,omitempty"`
	Backup  *CheckInfo `yaml:"backup,omitempty" json:"backup,omitempty"`
	Healthy bool       `yaml:"healthy,omitempty" json:"healthy,omitempty"`
	Message string     `yaml:"message,omitempty" json:"message,omitempty"`
}

Check model for the info objects for check, backup ...

type CheckInfo

type CheckInfo struct {
	LastCheck *time.Time `yaml:"lastCheck,omitempty" json:"lastCheck,omitempty"`
	Healthy   bool       `yaml:"healthy,omitempty" json:"healthy,omitempty"`
	Message   string     `yaml:"message,omitempty" json:"message,omitempty"`
}

CheckInfo model

type CreateResponse

type CreateResponse struct {
	TenantID string `json:"tenantid"`
	Backup   string `json:"backup"`
}

CreateResponse REST response for create response

func (CreateResponse) MarshalJSON

func (r CreateResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshall this to JSON

type DeleteResponse

type DeleteResponse struct {
	TenantID  string `json:"tenantid"`
	ProcessID string `json:"processid"`
}

DeleteResponse REST response for delete response

func (DeleteResponse) MarshalJSON

func (r DeleteResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshall this to JSON

type GetConfigResponse

type GetConfigResponse struct {
	TenantID string `json:"tenantid"`
	// to be compatible
	Created    bool           `json:"created"`
	Backup     config.Storage `json:"backup"`
	LastError  error          `json:"lastError"`
	Properties map[string]any `json:"properties"`
}

GetConfigResponse REST response for config request

func (GetConfigResponse) MarshalJSON

func (r GetConfigResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshall this to JSON

type RetentionEntry

type RetentionEntry struct {
	Filename      string `yaml:"filename" json:"filename"`
	TenantID      string `yaml:"tenantID" json:"tenantID"`
	BlobID        string `yaml:"blobID" json:"blobID"`
	CreationDate  int64  `yaml:"creationDate" json:"creationDate"`
	Retention     int64  `yaml:"retention" json:"retention"`
	RetentionBase int64  `yaml:"retentionBase" json:"retentionBase"`
}

RetentionEntry antry for the retention of a blob

func RetentionEntryFromBlobDescription

func RetentionEntryFromBlobDescription(b BlobDescription) RetentionEntry

RetentionEntryFromBlobDescription building a retention entry from a blobdescription

func (*RetentionEntry) GetRetentionTimestampMS

func (r *RetentionEntry) GetRetentionTimestampMS() int64

GetRetentionTimestampMS getting the time stamp in ms

type SizeResponse

type SizeResponse struct {
	TenantID string `json:"tenantid"`
	Size     int64  `json:"size"`
}

SizeResponse REST response for size response

func (SizeResponse) MarshalJSON

func (r SizeResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshall this to JSON

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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