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:
Leonard Lyubich 2020-08-22 12:28:33 +03:00 committed by Stanislav Bogatyrev
parent ecb0a4be67
commit 55a6509e8f
6 changed files with 148 additions and 112 deletions

25
v2/session/service.go Normal file
View 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
}