Documentation
¶
Index ¶
- Constants
- func Import(ctx context.Context, source Store, target *DBStore) error
- func IsReservedParam(key string) bool
- func WantsSchema(r *http.Request) bool
- type BodyDecoder
- type ContextProvider
- type DBStore
- type FileStore
- type Options
- type ResolvedProfile
- type Service
- func (s *Service) Delete(ctx context.Context, name string) error
- func (s *Service) Get(ctx context.Context, name string) (query.Profile, error)
- func (s *Service) Handler(prefix string, next http.Handler) (http.Handler, error)
- func (s *Service) List(ctx context.Context) ([]query.Profile, error)
- func (s *Service) OpenAPIHandler(root *cobra.Command, config *rpc.Config) (http.Handler, error)
- func (s *Service) RegisterClicky()
- func (s *Service) RegisterDynamic(ctx context.Context) error
- func (s *Service) Save(ctx context.Context, body map[string]any, id string) (query.Profile, error)
- type Store
- type StoreProvider
Constants ¶
const SchemaContentType = "application/schema+json"
Variables ¶
This section is empty.
Functions ¶
func IsReservedParam ¶
reservedParam reports whether a query-string key is a transport concern (paging, format, content-negotiation) rather than a profile filter param.
func WantsSchema ¶
Types ¶
type ContextProvider ¶
type DBStore ¶
type DBStore struct {
// contains filtered or unexported fields
}
type Options ¶
type Options struct {
Store StoreProvider
Context ContextProvider
DecodeBody BodyDecoder
}
type ResolvedProfile ¶ added in v0.1.23
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) OpenAPIHandler ¶
func (*Service) RegisterClicky ¶
func (s *Service) RegisterClicky()
registerProfileEntity registers the YAML-backed profile entity with list + full CRUD on the CLI and over HTTP. Create/Update use the context-aware handlers so the nested profile body (provider/params/columns) survives via rpc.RequestFromContext instead of the executor's flag-flattening. Execution (GET /{name}?params) is served by execHandler and schemas by schemaHandler.
func (*Service) RegisterDynamic ¶
registerProfileEntities registers one clicky dynamic entity per stored profile so each profile appears as its own sidebar surface (with a provider-derived icon) and is executable: the entity's List runs the profile and returns its rows. Entities are snapshotted at startup; a newly created profile needs a restart to appear as its own surface (it still executes via execHandler and shows in the aggregate list until then).