Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advice ¶
type Advice func(context.Context, proto.Message, mdval.IncomingMD, *MethodInfo, func(context.Context, game_context.GameContext, *model.User, mdval.IncomingMD) (proto.Message, error)) error
Advice は、RPC メソッドの実行前後に処理を挟むための関数です。 interceptor は MethodOption を解釈できないので、似た仕組みが別途必要になります。
func NewAdvice ¶
func NewAdvice(conn transaction.Connection, userRepo repository.UserRepository) Advice
type MethodErrDefinition ¶
type MethodErrDefinition = custom_option.MethodErrorDefinition
type MethodInfo ¶
type MethodInfo struct {
// contains filtered or unexported fields
}
func NewMethodInfo ¶
func NewMethodInfo(opt *MethodOption, errCauses map[error]*MethodErrDefinition) *MethodInfo
func (MethodInfo) FindErrorDefinition ¶
func (m MethodInfo) FindErrorDefinition(err error) (*MethodErrDefinition, bool)
func (*MethodInfo) Option ¶
func (m *MethodInfo) Option() *MethodOption
type MethodOption ¶
type MethodOption = custom_option.MethodOption
type Request ¶
type Request[T any] struct { // contains filtered or unexported fields }
func NewRequest ¶
func NewRequest[T proto.Message](msg T, gctx game_context.GameContext, principal *model.User) *Request[T]
func (Request[T]) GameContext ¶
func (r Request[T]) GameContext() game_context.GameContext
Click to show internal directories.
Click to hide internal directories.