transport

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const DisableStackTrace = "__disable_stack_trace__"
View Source
const QueryTypeKey = "__query_type__"

Variables

This section is empty.

Functions

func AppService

func AppService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func ConfigService

func ConfigService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func CurrentUserService

func CurrentUserService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func EventService

func EventService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func FileService

func FileService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func GlobalService

func GlobalService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func HTTPApplicationAuthenticationFilter

func HTTPApplicationAuthenticationFilter(endpoints endpoint.Set) restful.FilterFunction

func HTTPAuthenticationFilter

func HTTPAuthenticationFilter(endpoints endpoint.Set) restful.FilterFunction

func HTTPContextFilter

func HTTPContextFilter(pctx context.Context) restful.FilterFunction

func HTTPLoggingFilter

func HTTPLoggingFilter(pctx context.Context) func(req *restful.Request, resp *restful.Response, filterChan *restful.FilterChain)

func HTTPProxyAuthenticationFilter

func HTTPProxyAuthenticationFilter(ptx context.Context, endpoints endpoint.Set) restful.FilterFunction

func NewHTTPHandler

func NewHTTPHandler(ctx context.Context, logger log.Logger, endpoints endpoint.Set, openapiPath string) http.Handler

func NewKitHTTPServer

func NewKitHTTPServer[RequestType any](ctx context.Context, dp kitendpoint.Endpoint, options []httptransport.ServerOption) restful.RouteFunction

func NewProxyHandler

func NewProxyHandler(c context.Context, logger log.Logger, endpoints endpoint.Set) http.Handler

func NewRadiusService

func NewRadiusService(ctx context.Context, endpoints endpoint.Set) *radius.PacketServer

func NewSimpleKitHTTPServer

func NewSimpleKitHTTPServer[RequestType any](
	ctx context.Context,
	dp kitendpoint.Endpoint,
	dec httptransport.DecodeRequestFunc,
	enc httptransport.EncodeResponseFunc, options []httptransport.ServerOption,
) restful.RouteFunction

func NewSimpleWebService

func NewSimpleWebService(rootPath string, doc string) *restful.WebService

func NewStaticFileServer

func NewStaticFileServer(ctx context.Context, fileSystem fs.FS) http.Handler

func NewWebService

func NewWebService(rootPath string, gv schema.GroupVersion, doc string) *restful.WebService

func OAuthService

func OAuthService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func PageService

func PageService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func PermissionService

func PermissionService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func RadiusAppFilter

func RadiusAppFilter(endpoints endpoint.Set) radius.FilterFunction

func RadiusLoggingFilter

func RadiusLoggingFilter(pctx context.Context) radius.FilterFunction

func RoleService

func RoleService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func SessionService

func SessionService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

func SetCacheHeader

func SetCacheHeader(h http.Handler) http.Handler

func StructToQueryParams

func StructToQueryParams(obj interface{}, nameFilter ...string) []*restful.Parameter

func UserService

func UserService(ctx context.Context, options []httptransport.ServerOption, endpoints endpoint.Set) (spec.Tag, []*restful.WebService)

UserService User Manager Service for restful Http container

func WrapHTTPHandler

func WrapHTTPHandler(pctx context.Context, h *httptransport.Server) func(*restful.Request, *restful.Response)

Types

type File

type File struct {
	io.Reader
	// contains filtered or unexported fields
}

func (File) Close

func (f File) Close() error

func (File) Read

func (f File) Read(p []byte) (int, error)

func (File) Stat

func (f File) Stat() (fs.FileInfo, error)

type HTTPRequest

type HTTPRequest[T any] struct {
	Data T `json:"data"`
	// contains filtered or unexported fields
}

func (HTTPRequest[T]) GetRequestData

func (b HTTPRequest[T]) GetRequestData() interface{}

func (HTTPRequest[T]) GetRestfulRequest

func (b HTTPRequest[T]) GetRestfulRequest() *restful.Request

func (HTTPRequest[T]) GetRestfulResponse

func (b HTTPRequest[T]) GetRestfulResponse() *restful.Response

type ResponseWrapper

type ResponseWrapper[T any] struct {
	Data T `json:"data"`
}

type SecretSourceFunc

type SecretSourceFunc func(r *radius.Request) ([]byte, error)

func (SecretSourceFunc) RADIUSSecret

func (f SecretSourceFunc) RADIUSSecret(r *radius.Request) ([]byte, error)

type StaticFS

type StaticFS struct {
	// contains filtered or unexported fields
}

func (*StaticFS) GetIndexFile

func (t *StaticFS) GetIndexFile() (fs.File, error)

func (*StaticFS) Open

func (t *StaticFS) Open(name string) (fs.File, error)

type StaticFSInfo

type StaticFSInfo struct {
	fs.FileInfo
	// contains filtered or unexported fields
}

func (StaticFSInfo) Size

func (i StaticFSInfo) Size() int64

Jump to

Keyboard shortcuts

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