You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
358 B
24 lines
358 B
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)
|
|
}
|