schema

package
v0.0.0-...-95be1a2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentTypeFile   ContentType = "file"
	ContentTypeDir                = "dir"
	ContentTypeRoot               = "root"
	ContentTypeCommit             = "commit"
)
View Source
const (
	AttributeChangeTypeSet    AttributeChangeType = "set"
	AttributeChangeTypeAdd                        = "add"
	AttributeChangeTypeDelete                     = "del"
)
View Source
const MaxFilePartSize = 1024 * 1024 * 16

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeChange

type AttributeChange struct {
	AttributeName string              `json:"attributeName,omitempty"`
	ChangeType    AttributeChangeType `json:"type,omitempty"`
	Values        []string            `json:"values,omitempty"`
}

type AttributeChangeType

type AttributeChangeType string

type BlobRef

type BlobRef string

func GetBlobRef

func GetBlobRef(r io.Reader) BlobRef

func GetBlobRefBytes

func GetBlobRefBytes(b []byte) BlobRef

type BytesPart

type BytesPart struct {
	Size       uint64  `json:"size"`
	Offset     uint64  `json:"offset"`
	ContentRef BlobRef `json:"contentRef"`
}

type ContentType

type ContentType string

type Schema

type Schema struct {
	Version int         `json:"asamVersion"`
	Type    ContentType `json:"contentType"`

	// for a root
	RootName string `json:"rootName,omitempty"`

	// for a commit
	CommitTime              string             `json:"commitTime,omitempty"`
	RootRef                 BlobRef            `json:"root,omitempty"`
	ContentRef              BlobRef            `json:"contentRef,omitempty"`
	ContentAttributeChanges []*AttributeChange `json:"attributeChanges,omitempty"`

	FileName string `json:"fileName,omitempty"`

	UnixPermission string `json:"unixPermission,omitempty"`
	UnixMtime      string `json:"unixMtime,omitempty"`

	FileParts  []*BytesPart `json:"fileParts,omitempty"`
	DirEntries []BlobRef    `json:"dirEntries,omitempty"`
}

func NewSchema

func NewSchema(contentType ContentType) *Schema

Jump to

Keyboard shortcuts

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