structured

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentAttributes

type ContentAttributes struct {
	DigestMD5 *string `json:"digestMD5,omitempty"`
	MediaType *string `json:"mediaType,omitempty"`
	Width     *int    `json:"width,omitempty"`
	Height    *int    `json:"height,omitempty"`
	Size      *int    `json:"size,omitempty"`
}

func NewContentAttributes

func NewContentAttributes() *ContentAttributes

func (*ContentAttributes) Validate

func (c *ContentAttributes) Validate(validator structure.Validator)

type Session

type Session interface {
	io.Closer

	List(ctx context.Context, userID string, filter *image.Filter, pagination *page.Pagination) (image.ImageArray, error)
	Create(ctx context.Context, userID string, metadata *image.Metadata) (*image.Image, error)
	DeleteAll(ctx context.Context, userID string) (bool, error)
	DestroyAll(ctx context.Context, userID string) (bool, error)

	Get(ctx context.Context, id string, condition *request.Condition) (*image.Image, error)
	Update(ctx context.Context, id string, condition *request.Condition, update *Update) (*image.Image, error)
	Delete(ctx context.Context, id string, condition *request.Condition) (bool, error)
	Destroy(ctx context.Context, id string, condition *request.Condition) (bool, error)
}

type Store

type Store interface {
	NewSession() Session
}

type Update

type Update struct {
	Metadata          *image.Metadata    `json:"metadata,omitempty"`
	ContentID         *string            `json:"contentId,omitempty"`
	ContentIntent     *string            `json:"contentIntent,omitempty"`
	ContentAttributes *ContentAttributes `json:"contentAttributes,omitempty"`
	RenditionsID      *string            `json:"renditionsId,omitempty"`
	Rendition         *string            `json:"rendition,omitempty"`
}

func NewUpdate

func NewUpdate() *Update

func (*Update) IsEmpty

func (u *Update) IsEmpty() bool

func (*Update) Validate

func (u *Update) Validate(validator structure.Validator)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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