asset

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	AssetType      api.AssetType
	DeliveryType   api.DeliveryType
	Transformation transformation.RawTransformation
	Version        int
	PublicID       string
	Suffix         string
	Config         config.Configuration
	AuthToken      AuthToken
	// contains filtered or unexported fields
}

Asset is the Asset struct.

func File

func File(publicID string, conf *config.Configuration) (*Asset, error)

File returns a new file Asset instance from the provided configuration.

func Image

func Image(publicID string, conf *config.Configuration) (*Asset, error)

Image returns a new image Asset instance from the provided configuration.

func Media

func Media(publicID string, conf *config.Configuration) (*Asset, error)

Media returns a new media Asset instance from the provided configuration.

func New

func New(publicID string, conf *config.Configuration) (*Asset, error)

New returns a new Asset instance from the provided configuration.

func Video

func Video(publicID string, conf *config.Configuration) (*Asset, error)

Video returns a new video Asset instance from the provided configuration.

func (Asset) String

func (a Asset) String() (result string, err error)

String serializes Asset to string.

type AuthToken

type AuthToken struct {
	Config *config.AuthToken
}

AuthToken is the Authentication Token struct.

func (AuthToken) Generate

func (a AuthToken) Generate(path string) string

Generate generates the authentication token.

type SearchURLAsset added in v2.3.0

type SearchURLAsset struct {
	SearchQuery search.Query
	TTL         int
	NextCursor  string
	Config      config.Configuration
	// contains filtered or unexported fields
}

SearchURLAsset is the SearchURLAsset struct.

func SearchURL added in v2.3.0

func SearchURL(query search.Query, conf *config.Configuration) (*SearchURLAsset, error)

SearchURL returns a new SearchURLAsset instance from the provided query and configuration.

func (SearchURLAsset) String added in v2.3.0

func (sa SearchURLAsset) String() (result string, err error)

String serializes SearchURLAsset to string.

func (SearchURLAsset) ToURL added in v2.3.0

func (sa SearchURLAsset) ToURL(ttl int, nextCursor string) (result string, err error)

ToURL serializes SearchURLAsset to string.

func (SearchURLAsset) ToURLWithNextCursor added in v2.3.0

func (sa SearchURLAsset) ToURLWithNextCursor(nextCursor string) (result string, err error)

ToURLWithNextCursor serializes SearchURLAsset to string.

Jump to

Keyboard shortcuts

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