Documentation
¶
Index ¶
- Constants
- func DecodeBody(ctx context.Context, fallback map[string]any) (map[string]any, error)
- func NormalizeConfigDir(value string) string
- func ResolveConfigDir(args []string) string
- func ResolveProfilesDir(args []string) string
- func WriteSchemas(dir string) error
- type App
- func (a *App) RegisterEntities(ctx context.Context) error
- func (a *App) RunTop(ctx context.Context, name string, options sessions.TopOptions) error
- func (a *App) RunTrace(ctx context.Context, name string, options sessions.TraceOptions) error
- func (a *App) Serve(parent context.Context, root *cobra.Command, configDir string, ...) error
- type Options
- type Runtime
- func (r *Runtime) Context() dbcontext.Context
- func (r *Runtime) Database() (*gorm.DB, error)
- func (r *Runtime) ProfileStore() (profiles.Store, error)
- func (r *Runtime) SetContext(ctx dbcontext.Context) error
- func (r *Runtime) SetDatabase(db *gorm.DB) error
- func (r *Runtime) SetProfileStore(store profiles.Store) error
- type ServeOptions
Constants ¶
View Source
const SchemaContentType = profiles.SchemaContentType
SchemaContentType is the media type a client sends in Accept to request a resource's JSON Schema instead of its data, served on the same endpoint.
Variables ¶
This section is empty.
Functions ¶
func DecodeBody ¶
func NormalizeConfigDir ¶
func ResolveConfigDir ¶
func ResolveProfilesDir ¶
func WriteSchemas ¶
WriteSchemas renders each schema to <dir>/<file>, creating the directory.
Types ¶
type App ¶
type App struct {
Runtime *Runtime
Connections *connections.Service
Profiles *profiles.Service
Sessions *sessions.Runner
// contains filtered or unexported fields
}
type ServeOptions ¶
type ServeOptions struct {
Host string
Port int
DataDir string
Dev bool
MaxSessions int
MaxSessionDuration time.Duration
SessionRetention time.Duration
}
func DefaultServeOptions ¶
func DefaultServeOptions() ServeOptions
Click to show internal directories.
Click to hide internal directories.