drapi

package
v0.2.49-beta.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get added in v0.2.47

func Get(url, info string) (*http.Response, error)

func GetJSON added in v0.2.47

func GetJSON(url, info string, v any) error

Types

type LLM added in v0.2.47

type LLM struct {
	LlmID    string `json:"llmId"`
	Name     string `json:"name"`
	Provider string `json:"provider"`
	IsActive bool   `json:"isActive"`
}

type LLMList added in v0.2.47

type LLMList struct {
	LLMs       []LLM  `json:"data"`
	Count      int    `json:"count"`
	TotalCount int    `json:"totalCount"`
	Next       string `json:"next"`
	Previous   string `json:"previous"`
}

func GetLLMs added in v0.2.47

func GetLLMs() (*LLMList, error)

type Repository

type Repository struct {
	URL      string `json:"url"`
	Tag      string `json:"tag"`
	IsPublic bool   `json:"isPublic"`
}

type Template

type Template struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	IsGlobal    bool   `json:"isGlobal"`
	IsPremium   bool   `json:"isPremium"`

	Readme     string     `json:"readme"`
	Tags       []string   `json:"tags"`
	Repository Repository `json:"repository"`
	MediaURL   string     `json:"mediaURL"`

	CreatedAt time.Time `json:"createdAt"`
}

func GetTemplate

func GetTemplate(id string) (*Template, error)

func (Template) DefaultDir

func (t Template) DefaultDir() string

func (Template) FilterValue

func (t Template) FilterValue() string

type TemplateList

type TemplateList struct {
	Templates  []Template `json:"data"`
	Count      int        `json:"count"`
	TotalCount int        `json:"totalCount"`
	Next       string     `json:"next"`
	Previous   string     `json:"previous"`
}

func GetPublicTemplatesSorted added in v0.2.0

func GetPublicTemplatesSorted() (*TemplateList, error)

func GetTemplates

func GetTemplates() (*TemplateList, error)

func (TemplateList) ExcludePremium added in v0.2.0

func (tl TemplateList) ExcludePremium() TemplateList

func (TemplateList) SortByName added in v0.2.0

func (tl TemplateList) SortByName() TemplateList

func (TemplateList) SortNewestFirst added in v0.2.0

func (tl TemplateList) SortNewestFirst() TemplateList

Jump to

Keyboard shortcuts

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