asset

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: MIT Imports: 18 Imported by: 3

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.

Jump to

Keyboard shortcuts

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