gallerypb

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_mediaentity_gallery_v0_gallery_proto protoreflect.FileDescriptor

Functions

func AsGallery

func AsGallery[StackID, ImageID gallery.ID](g *Gallery, toStackID func(string) StackID, toImageID func(string) ImageID) gallery.DTO[StackID, ImageID]

func AsImage

func AsImage[ID gallery.ID](img *Image, toImageID func(string) ID) gallery.Image[ID]

func AsStack

func AsStack[StackID, ImageID gallery.ID](s *Stack, toStackID func(string) StackID, toImageID func(string) ImageID) gallery.Stack[StackID, ImageID]

Types

type Gallery struct {
	Stacks []*Stack `protobuf:"bytes,1,rep,name=stacks,proto3" json:"stacks,omitempty"`
	// contains filtered or unexported fields
}

Gallery is an image gallery.

func New

func New[StackID, ImageID gallery.ID](g gallery.DTO[StackID, ImageID]) *Gallery

func (*Gallery) AsGallery

func (g *Gallery) AsGallery() gallery.DTO[StringID, StringID]

func (*Gallery) Descriptor deprecated

func (*Gallery) Descriptor() ([]byte, []int)

Deprecated: Use Gallery.ProtoReflect.Descriptor instead.

func (*Gallery) GetStacks

func (x *Gallery) GetStacks() []*Stack

func (*Gallery) ProtoMessage

func (*Gallery) ProtoMessage()

func (*Gallery) ProtoReflect

func (x *Gallery) ProtoReflect() protoreflect.Message

func (*Gallery) Reset

func (x *Gallery) Reset()

func (*Gallery) String

func (x *Gallery) String() string

type Image

type Image struct {
	Image    *v0.Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	Id       string    `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	Original bool      `protobuf:"varint,3,opt,name=original,proto3" json:"original,omitempty"`
	// contains filtered or unexported fields
}

Image is an image/variant of a stack.

func NewVariant

func NewVariant[ID gallery.ID](img gallery.Image[ID]) *Image

func (*Image) AsImage

func (img *Image) AsImage() gallery.Image[StringID]

func (*Image) Descriptor deprecated

func (*Image) Descriptor() ([]byte, []int)

Deprecated: Use Image.ProtoReflect.Descriptor instead.

func (*Image) GetId

func (x *Image) GetId() string

func (*Image) GetImage

func (x *Image) GetImage() *v0.Image

func (*Image) GetOriginal

func (x *Image) GetOriginal() bool

func (*Image) ProtoMessage

func (*Image) ProtoMessage()

func (*Image) ProtoReflect

func (x *Image) ProtoReflect() protoreflect.Message

func (*Image) Reset

func (x *Image) Reset()

func (*Image) String

func (x *Image) String() string

type Stack

type Stack struct {
	Id       string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Variants []*Image `protobuf:"bytes,2,rep,name=variants,proto3" json:"variants,omitempty"`
	Tags     []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

Stack represents an image of a gallery that may have multiple variants of the same image.

func NewStack

func NewStack[StackID, ImageID gallery.ID](s gallery.Stack[StackID, ImageID]) *Stack

func (*Stack) AsStack

func (s *Stack) AsStack() gallery.Stack[StringID, StringID]

func (*Stack) Descriptor deprecated

func (*Stack) Descriptor() ([]byte, []int)

Deprecated: Use Stack.ProtoReflect.Descriptor instead.

func (*Stack) GetId

func (x *Stack) GetId() string

func (*Stack) GetTags

func (x *Stack) GetTags() []string

func (*Stack) GetVariants

func (x *Stack) GetVariants() []*Image

func (*Stack) ProtoMessage

func (*Stack) ProtoMessage()

func (*Stack) ProtoReflect

func (x *Stack) ProtoReflect() protoreflect.Message

func (*Stack) Reset

func (x *Stack) Reset()

func (*Stack) String

func (x *Stack) String() string

type StringID

type StringID string

func (StringID) String

func (id StringID) String() string

Jump to

Keyboard shortcuts

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