Versions in this module Expand all Collapse all v0 v0.1.0 Nov 9, 2022 Changes in this version + const BASE64 + const LARGE + const MEDIUM + const SMALL + const URL + type ApiKeyTransport struct + ApiKey string + Transport http.RoundTripper + func (t *ApiKeyTransport) RoundTrip(req *http.Request) (*http.Response, error) + type Client interface + Create func(context.Context, string, ...Option) (*Response, error) + Edit func(context.Context, []byte, []byte, string, ...Option) (*Response, error) + Variation func(context.Context, []byte, ...Option) (*Response, error) + func MakeNewClientV1(apiKey string) (Client, error) + type ClientV1 struct + Url *url.URL + UserAgent string + func (c *ClientV1) Create(ctx context.Context, prompt string, opts ...Option) (*Response, error) + func (c *ClientV1) Edit(ctx context.Context, image, mask []byte, prompt string, opts ...Option) (*Response, error) + func (c *ClientV1) Variation(ctx context.Context, image []byte, opts ...Option) (*Response, error) + type ErrorDetails struct + Code int + Message string + Param string + Type string + type ErrorResponse struct + ErrorDetails *ErrorDetails + func (e *ErrorResponse) Error() string + type Option func(*apiOption) + func WithFormat(format string) Option + func WithNumImages(n uint8) Option + func WithSize(size string) Option + func WithUser(user string) Option + type OutputImage struct + Base64 string + Url string + type Response struct + Created int64 + Data []*OutputImage