Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content interface { GetHash() (ref.FileHash, error) BytesReader() (*bytes.Reader, error) Sizer }
func New ¶
func New(opts ...ContentOption) Content
type ContentOption ¶
type ContentOption func(*content)
func WithBytes ¶
func WithBytes(buf []byte) ContentOption
func WithFilePath ¶
func WithFilePath(fp string) ContentOption
func WithHash ¶
func WithHash(hash ref.FileHash) ContentOption
func WithLoadFunc ¶
func WithLoadFunc(f loadFunc) ContentOption
func WithLoader ¶
func WithLoader(l Loader) ContentOption
func WithPos ¶
func WithPos(pos pos.P) ContentOption
func WithSizer ¶
func WithSizer(s Sizer) ContentOption
type ImageContent ¶
func AsImage ¶
func AsImage(ic Content) ImageContent
func NewImage ¶
func NewImage(image Image) ImageContent
Click to show internal directories.
Click to hide internal directories.