api

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseError

func ParseError(resp *http.Response) error

ParseError parses an error response

Types

type APIErrorResponse

type APIErrorResponse struct {
	Message string `json:"message"`
	Key     string `json:"key"`
}

APIErrorResponse represents an error response from the API

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a MoMorph API client

func NewClient

func NewClient() (*Client, error)

NewClient creates a new MoMorph API client

func (*Client) Get

func (c *Client) Get(ctx context.Context, path string) (*http.Response, error)

Get performs a GET request

func (*Client) GetProjectTemplate

func (c *Client) GetProjectTemplate(ctx context.Context, aiTool string) (*TemplateMetadata, error)

GetProjectTemplate retrieves template metadata for the specified AI tool

type ErrorResponse

type ErrorResponse struct {
	Error   string `json:"error"`
	Message string `json:"message"`
}

ErrorResponse represents an API error response

type TemplateMetadata

type TemplateMetadata struct {
	Key         string `json:"key"`       // S3 key path
	DownloadURL string `json:"url"`       // Presigned URL
	ExpiresIn   int    `json:"expiresIn"` // URL expiration in seconds
	Cached      bool   `json:"cached"`    // Whether response was cached
}

TemplateMetadata represents template information from the API

Jump to

Keyboard shortcuts

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