forked from TrueCloudLab/frostfs-api-go
v2: Define API service interfaces
Define interfaces that reflect service (Accounting, Container, Session) declarations in the API. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
ecb0a4be67
commit
55a6509e8f
6 changed files with 148 additions and 112 deletions
25
v2/session/service.go
Normal file
25
v2/session/service.go
Normal file
|
@ -0,0 +1,25 @@
|
|||
package session
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type Service interface {
|
||||
Create(context.Context, *CreateRequest) (*CreateResponse, error)
|
||||
}
|
||||
|
||||
type CreateRequest struct {
|
||||
body *CreateRequestBody
|
||||
|
||||
metaHeader *RequestMetaHeader
|
||||
|
||||
verifyHeader *RequestVerificationHeader
|
||||
}
|
||||
|
||||
type CreateResponse struct {
|
||||
body *CreateResponseBody
|
||||
|
||||
metaHeader *ResponseMetaHeader
|
||||
|
||||
verifyHeader *ResponseVerificationHeader
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue