transport

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 79 Imported by: 0

Documentation

Index

Constants

View Source
const DisableStackTrace = "__disable_stack_trace__"

Variables

View Source
var RadiusTypeName = map[radius.Type]string{}/* 182 elements not displayed */

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 RadiusEAPAuthFilter added in v1.4.0

func RadiusEAPAuthFilter(w radius.ResponseWriter, r *radius.Request, fc *radius.FilterChain)

func RadiusEAPHandler added in v1.4.0

func RadiusEAPHandler(writer radius.ResponseWriter, r *radius.Request, ch HandlerChain)

func RadiusLoggingFilter

func RadiusLoggingFilter(pctx context.Context) radius.FilterFunction

func RadiusValidateAuthRequestFilter added in v1.4.0

func RadiusValidateAuthRequestFilter(w radius.ResponseWriter, r *radius.Request, fc *radius.FilterChain)

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 EAPMessage added in v1.4.0

type EAPMessage struct {
	Code EAPMessageCode
	Id   byte
	Type EAPMessageType
	Date []byte
}

type EAPMessageCode added in v1.4.0

type EAPMessageCode uint8
const (
	EAPMessageCodeRequest    EAPMessageCode = 1
	EAPMessageCodeResponse   EAPMessageCode = 2
	EAPMessageCodeSuccess    EAPMessageCode = 3
	EAPMessageCodeFailure    EAPMessageCode = 4
	EAPMessageCodeComplete   EAPMessageCode = 5
	EAPMessageCodeOutOfOrder EAPMessageCode = 6
)

type EAPMessageID added in v1.4.0

type EAPMessageID uint8

type EAPMessageType added in v1.4.0

type EAPMessageType uint8
const (
	EAPMessageTypeIdentity        EAPMessageType = 1
	EAPMessageTypeNotification    EAPMessageType = 2
	EAPMessageTypeNak             EAPMessageType = 3
	EAPMessageTypeMD5Challenge    EAPMessageType = 4
	EAPMessageTypeOneTimePassword EAPMessageType = 5
	EAPMessageTypeGTC             EAPMessageType = 6
	EAPMessageTypeGeneric         EAPMessageType = 254
	EAPMessageTypeExpandable      EAPMessageType = 255
)

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 HandlerChain added in v1.4.0

type HandlerChain []func(w radius.ResponseWriter, r *radius.Request, ch HandlerChain)

func (HandlerChain) ServeRADIUS added in v1.4.0

func (h HandlerChain) ServeRADIUS(w radius.ResponseWriter, r *radius.Request)

type RadiusEAPResponseWriter added in v1.4.0

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

func (*RadiusEAPResponseWriter) Write added in v1.4.0

func (r *RadiusEAPResponseWriter) Write(packet *radius.Packet) error

type RadiusMessageAuthenticatorResponseWriter added in v1.4.0

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

func (*RadiusMessageAuthenticatorResponseWriter) Write added in v1.4.0

type ResponseWrapper

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

type ResponseWriter added in v1.4.0

type ResponseWriter struct {
	radius.ResponseWriter
	// contains filtered or unexported fields
}

func (*ResponseWriter) Write added in v1.4.0

func (r *ResponseWriter) Write(packet *radius.Packet) error

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