Documentation ¶
Overview ¶
Package ui takes a sysl module with attributes defined (uiFields) and serves a webserver listing the applications and endpoints It also uses gRPC UI and Redoc in order to generate an interactive page to interact with all the endpoints gRPC currently uses server reflection TODO: Support gpcui directly from proto files
Package ui takes a sysl module with attributes defined (uiFields) and serves a webserver listing the applications and endpoints It also uses GRPCUI and Redoc in order to generate an interactive page to interact with all the endpoints GRPC currently uses server reflection TODO: Support gpcui directly from swagger files
Index ¶
Constants ¶
const GRPC = "grpc"
const REST = "rest"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIDoc ¶
type APIDoc struct {
// contains filtered or unexported fields
}
APIDoc contains everything required to serve a view of a Sysl described application
type APIDocBuilder ¶
type APIDocBuilder struct {
// contains filtered or unexported fields
}
func MakeAPIDocBuilder ¶
func MakeAPIDocBuilder(app *sysl.Application, log *logrus.Logger, grpcui bool) *APIDocBuilder
func (APIDocBuilder) BuildAPIDoc ¶
func (b APIDocBuilder) BuildAPIDoc() (*APIDoc, error)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func MakeServer ¶
func MakeServer(docHandlers map[string]*http.Handler, apiDocs []*APIDoc, serviceJSON []byte, log *logrus.Logger, host string) *Server
MakeServer returns a WebServer
func (*Server) Serve ¶
Serve starts up a webserver that documents the apps and endpoints documented in the sysl file
type SyslUI ¶
type SyslUI struct { Fs afero.Fs // Required Log *logrus.Logger // Required Modules []*sysl.Module // Required Fields []string // Required Host string // Required GRPCUI bool BasePath string }
SyslUI holds the config options passed into the command
func (*SyslUI) GenerateServer ¶
type WebService ¶
type WebService struct { Name string Attributes map[string]string Endpoints []Endpoint Type string Path string }
WebService is the struct which will be translated to JSON via reflection.
func BuildWebService ¶
func BuildWebService(a *sysl.Application) (*WebService, error)
BuildWebService takes a sysl Application and returns a json-exportable representation of Sysl