mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
24 lines
358 B
Go
24 lines
358 B
Go
package api2rpc
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Ignore struct{}
|
|
|
|
type ApiBind[A, B any] interface {
|
|
OperationID() string
|
|
OpUserID() (string, error)
|
|
Bind(*A) error
|
|
Context() context.Context
|
|
Resp(resp *B, err error)
|
|
}
|
|
|
|
type Api interface {
|
|
OperationID() string
|
|
OpUserID() string
|
|
Context() context.Context
|
|
Bind(req any) error
|
|
Resp(resp any, err error)
|
|
}
|