Documentation ¶
Index ¶
- Variables
- type AlgKey
- type ImageRequest
- type ImageService
- type RemoteImage
- func (remoteImage *RemoteImage) GetPair(prefix string) (key string, value string, err error)
- func (remoteImage *RemoteImage) ParseValue(value string) error
- func (remoteImage *RemoteImage) Process() (err error)
- func (remoteImage *RemoteImage) String() string
- func (remoteImage *RemoteImage) Type() string
- type RemoteImageOption
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ImageRequest ¶
type ImageRequest struct { URL string `json:"url"` Options bimg.Options `json:"options"` Signature string `json:"-"` }
func NewImageRequest ¶ added in v1.5.1
func NewImageRequest(signature string) *ImageRequest
func ParseToken ¶
func ParseToken(algKey AlgKey, queryToken string, debug bool) (*ImageRequest, error)
func (*ImageRequest) Download ¶
func (ir *ImageRequest) Download() (remoteImage *RemoteImage, err error)
func (*ImageRequest) GetKey ¶
func (ir *ImageRequest) GetKey(prefix string) (key string)
func (*ImageRequest) String ¶
func (ir *ImageRequest) String() string
type ImageService ¶
type RemoteImage ¶
type RemoteImage struct { ImageRequest `json:"image_request"` Data *[]byte `json:"data"` }
func NewRemoteImage ¶
func NewRemoteImage(opts ...RemoteImageOption) *RemoteImage
func (*RemoteImage) GetPair ¶
func (remoteImage *RemoteImage) GetPair(prefix string) (key string, value string, err error)
func (*RemoteImage) ParseValue ¶
func (remoteImage *RemoteImage) ParseValue(value string) error
func (*RemoteImage) Process ¶
func (remoteImage *RemoteImage) Process() (err error)
func (*RemoteImage) String ¶
func (remoteImage *RemoteImage) String() string
func (*RemoteImage) Type ¶
func (remoteImage *RemoteImage) Type() string
type RemoteImageOption ¶
type RemoteImageOption func(*RemoteImage)
func WithImageRequest ¶
func WithImageRequest(imageRequest *ImageRequest) RemoteImageOption
func WithURL ¶
func WithURL(url string) RemoteImageOption
func WithbimgOptions ¶
func WithbimgOptions(options bimg.Options) RemoteImageOption
Click to show internal directories.
Click to hide internal directories.