saddle

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 16 Imported by: 0

README

saddle

NOTE: Do not use. Purely for laughs.
For laughs.
go get github.com/captjt/saddle

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command[T Service](service T, entry func(*cobra.Command, []string) error) *cobra.Command

func Instantiate

func Instantiate[T Service](service T) (T, func(cmd *cobra.Command, args []string) error)

func New

func New(version string) *cobra.Command

Types

type Project

type Project[T Service] struct {
	// App contains the referenced Fiber framework app instance attached to the project.
	App *fiber.App
	// contains filtered or unexported fields
}

Project contains elements, functions and references attached to a project.

type Service

type Service interface {
	// Attach attaches the service to execute | expose.
	Attach(*fiber.App, *log.Logger, *validator.Validate) (func(), error)
	// Config returns the configuration of a service.
	Config() any
	// Description returns the description of a service.
	Description() string
	// Name returns the name of a service.
	Name() string
	// Validator returns the validator of a service.
	Validator() *validator.Validate
}

Service contains functions references attached to a service.

type Validate

type Validate struct {
	Validator *validator.Validate
}

Directories

Path Synopsis
Package middleware contains saddle-level related middleware which utilizes the Echo framework.
Package middleware contains saddle-level related middleware which utilizes the Echo framework.
pkg

Jump to

Keyboard shortcuts

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