Documentation
¶
Index ¶
- Variables
- type CreateRequest
- type GetResponse
- type ProviderConfigSchema
- type ProviderFieldSchema
- type ProviderMeta
- type ProviderName
- type Service
- func (s *Service) Create(ctx context.Context, req CreateRequest) (GetResponse, error)
- func (s *Service) Delete(ctx context.Context, id string) error
- func (s *Service) EnsureDefaults(ctx context.Context) error
- func (s *Service) Get(ctx context.Context, id string) (GetResponse, error)
- func (s *Service) GetRawByID(ctx context.Context, id string) (sqlc.FetchProvider, error)
- func (s *Service) List(ctx context.Context, provider string) ([]GetResponse, error)
- func (*Service) ListMeta(_ context.Context) []ProviderMeta
- func (s *Service) Update(ctx context.Context, id string, req UpdateRequest) (GetResponse, error)
- type UpdateRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrManagedNativeProvider = errors.New("native fetch provider is managed by the system")
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct {
Name string `json:"name"`
Provider ProviderName `json:"provider"`
Config map[string]any `json:"config,omitempty"`
}
type GetResponse ¶
type ProviderConfigSchema ¶
type ProviderConfigSchema struct {
Fields map[string]ProviderFieldSchema `json:"fields"`
}
type ProviderFieldSchema ¶
type ProviderMeta ¶
type ProviderMeta struct {
Provider string `json:"provider"`
DisplayName string `json:"display_name"`
ConfigSchema ProviderConfigSchema `json:"config_schema"`
}
type ProviderName ¶
type ProviderName string
const ( ProviderNative ProviderName = "native" ProviderJina ProviderName = "jina" ProviderCloudflareMarkdown ProviderName = "cloudflare_markdown" )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, req CreateRequest) (GetResponse, error)
func (*Service) GetRawByID ¶
func (*Service) Update ¶
func (s *Service) Update(ctx context.Context, id string, req UpdateRequest) (GetResponse, error)
type UpdateRequest ¶
type UpdateRequest struct {
Name *string `json:"name,omitempty"`
Provider *ProviderName `json:"provider,omitempty"`
Config map[string]any `json:"config,omitempty"`
Enable *bool `json:"enable,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.