Documentation
¶
Index ¶
- Constants
- type ApiKeyTransport
- type Client
- type ClientV1
- 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
- type ErrorResponse
- type Option
- type OutputImage
- type Response
Constants ¶
View Source
const ( SMALL = "256x256" MEDIUM = "512x512" LARGE = "1024x1024" URL = "url" BASE64 = "b64_json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiKeyTransport ¶
type ApiKeyTransport struct { ApiKey string Transport http.RoundTripper }
type Client ¶
type Client interface { Create(context.Context, string, ...Option) (*Response, error) Edit(context.Context, []byte, []byte, string, ...Option) (*Response, error) Variation(context.Context, []byte, ...Option) (*Response, error) }
func MakeNewClientV1 ¶
type ErrorDetails ¶
type ErrorResponse ¶
type ErrorResponse struct {
ErrorDetails *ErrorDetails `json:"error,omitempty"`
}
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
type OutputImage ¶
type Response ¶
type Response struct { Created int64 `json:"created,omitempty"` Data []*OutputImage `json:"data,omitempty"` }
Click to show internal directories.
Click to hide internal directories.