models

package
v0.0.0-...-33abfaa Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIDescription

type APIDescription struct {
	APIVersion string `json:"apiVersion"`
}

type Blob

type Blob struct {
	Id       int64       `db:"id" json:"id"`
	Name     string      `json:"name" validate:"required" db:"name"`
	Bucket   string      `json:"bucket" validate:"required" db:"bucket"`
	Date     time.Time   `json:"uploaded" db:"date"`
	Class    BlobType    `json:"type" validate:"required,oneof=permanent temp" db:"class"`
	Checksum string      `db:"sha1" json:"sha1"`
	Uploader string      `json:"owner" validate:"required" db:"uploader"`
	Metadata MetadataMap `json:"metadata" db:"metadata"`
	Size     int64       `json:"size" db:"size"`
}

func (*Blob) Validate

func (b *Blob) Validate() error

type BlobIdentifier

type BlobIdentifier int64

type BlobSearch

type BlobSearch struct {
	Name     *string `json:"name"`
	Checksum *string `json:"checksum"`
	Bucket   *string `json:"bucket"`
}

type BlobType

type BlobType string

BlobType consists of a

const (
	PermanentBlob BlobType = "permanent"
	TemporaryBlob BlobType = "temp"
)

type BlobUploadResponse

type BlobUploadResponse struct {
	RedirectURL string `json:"redirectURL"`
	Blob        *Blob
}

type MetadataMap

type MetadataMap map[string]interface{}

func (MetadataMap) Scan

func (m MetadataMap) Scan(src interface{}) error

func (MetadataMap) Value

func (m MetadataMap) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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