Documentation
¶
Index ¶
- func MaskValue(value string) string
- func Parse(body map[string]any) (*models.Connection, error)
- type BodyDecoder
- type ContextProvider
- type DatabaseProvider
- type ListOptions
- type Options
- type Service
- func (s *Service) Create(ctx context.Context, body map[string]any) (*models.Connection, error)
- func (s *Service) Delete(id string) error
- func (s *Service) Get(id string) (*models.Connection, error)
- func (s *Service) Handler(prefix string, next http.Handler) http.Handler
- func (s *Service) List(options ListOptions) ([]*models.Connection, error)
- func (s *Service) RegisterClicky()
- func (s *Service) Update(ctx context.Context, id string, body map[string]any) (*models.Connection, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContextProvider ¶
type DatabaseProvider ¶
type ListOptions ¶
type ListOptions struct {
Type string `flag:"type" help:"Filter by connection type"`
Types string `flag:"types" help:"Filter by connection types (comma-separated)"`
}
ListOptions are the list/filter options for the connection entity. Types is the comma-separated form used by the connection lookup to scope a picker to the connection types valid for a profile's provider (e.g. sql → postgres,mysql,...).
type Options ¶
type Options struct {
Database DatabaseProvider
Context ContextProvider
DecodeBody BodyDecoder
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) List ¶
func (s *Service) List(options ListOptions) ([]*models.Connection, error)
func (*Service) RegisterClicky ¶
func (s *Service) RegisterClicky()
registerConnectionEntity registers the DB-backed connection entity with full CRUD on both the CLI and over HTTP. Create/Update use the context-aware handlers so they can read the raw nested JSON body (e.g. connection `properties`) clicky stashes on the context via rpc.RequestFromContext, which the executor would otherwise flatten to string flags. The database provider resolves lazily because entities register before the database exists.