Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnyMessage ¶ added in v1.1.4
func NewAnyMessage ¶ added in v1.1.4
func NewAnyMessage(data any, err error) *AnyMessage
type BaseController ¶
type BaseController interface { MessageSender network.BaseController }
func NewBaseController ¶
func NewBaseController(basePath string, authProvider network.AuthenticationProvider, authorizeProvider network.AuthorizationProvider) BaseController
type Controller ¶
type Controller interface { BaseController MountNats(group NatsGroup) }
type Message ¶
type Message[T any] struct { Data T `json:"data,omitempty"` Error *string `json:"error,omitempty"` }
func NewMessage ¶
type MessageSender ¶ added in v1.1.4
type MessageSender interface {
SendNats(req NatsRequest) SendMessage
}
func NewMessageSender ¶ added in v1.1.4
func NewMessageSender() MessageSender
type Module ¶ added in v1.1.2
type Module[T any] interface { network.BaseModule[T] Controllers() []Controller }
type NatsClient ¶
type NatsClient interface { GetInstance() *natsClient Disconnect() }
func NewNatsClient ¶
func NewNatsClient(config *Config) NatsClient
type NatsHandlerFunc ¶
type NatsHandlerFunc = micro.HandlerFunc
type NatsRequest ¶
type RequestBuilder ¶ added in v1.1.4
type RequestBuilder[T any] interface { NatsClient() NatsClient Request(data any) Request[T] }
func NewRequestBuilder ¶ added in v1.1.4
func NewRequestBuilder[T any](natsClient NatsClient, subject string) RequestBuilder[T]
type Router ¶
type Router interface { network.BaseRouter NatsClient() NatsClient LoadControllers(controllers []Controller) }
func NewRouter ¶
func NewRouter(mode string, natsClient NatsClient) Router
type SendMessage ¶ added in v1.1.4
Click to show internal directories.
Click to hide internal directories.