Documentation
¶
Index ¶
Constants ¶
View Source
const ( ResizeMethodScale = "scale" ResizeMethodFit = "fit" ResizeMethodCover = "cover" )
View Source
const ApiEndpoint = "https://api.tinify.com"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ResizeMethod ¶
type ResizeMethod string
type ResizeOption ¶
type ResizeOption struct { Method ResizeMethod `json:"method"` Width int64 `json:"width,omitempty"` Height int64 `json:"height,omitempty"` }
type Result ¶
type Result struct { *ResultMeta // contains filtered or unexported fields }
func (*Result) ContentType ¶
type ResultMeta ¶
type ResultMeta struct {
// contains filtered or unexported fields
}
func NewResultMeta ¶
func NewResultMeta(meta http.Header) *ResultMeta
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
func FromBuffer ¶
func (*Source) Resize ¶
func (s *Source) Resize(option *ResizeOption) error
Click to show internal directories.
Click to hide internal directories.