object

package
v0.0.0-...-ac0742e Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Descriptor

type Descriptor struct {
	// Digest is the digest of the targeted content.
	Digest digest.Digest `json:"digest"`

	// Size specifies the size in bytes of the targeted content.
	Size uint64 `json:"size"`

	// ContentType specifies the media type string of the targeted content.
	ContentType string `json:"contentType"`
}

Descriptor describes the disposition of targeted content.

type Metadata

type Metadata map[string]interface{}

Metadata holds custom attributes for objects.

func (Metadata) Get

func (m Metadata) Get(key string, defaultValue interface{}) interface{}

Get returns the value for the given key, if any, otherwise returns defaultValue

func (*Metadata) Set

func (m *Metadata) Set(key string, value interface{})

Set sets the value for given key

func (*Metadata) SetValues

func (m *Metadata) SetValues(values map[string]interface{})

SetValues sets given values into this Metadata instance

type Object

type Object struct {
	Descriptor `json:"descriptor"`
	Metadata   `json:"metadata"`
	URI        uri.URI `json:"uri"`
}

Object represents the set of all relevant information gathered from a digital object referenced by URI.

Jump to

Keyboard shortcuts

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