forked from TrueCloudLab/frostfs-sdk-go
[#276] Merge repo with frostfs-api-go
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
This commit is contained in:
parent
5361f0eceb
commit
6ce73790ea
337 changed files with 66666 additions and 283 deletions
86
api/session/json.go
Normal file
86
api/session/json.go
Normal file
|
@ -0,0 +1,86 @@
|
|||
package session
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/rpc/message"
|
||||
session "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/session/grpc"
|
||||
)
|
||||
|
||||
func (c *ObjectSessionContext) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(c)
|
||||
}
|
||||
|
||||
func (c *ObjectSessionContext) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(c, data, new(session.ObjectSessionContext))
|
||||
}
|
||||
|
||||
func (l *TokenLifetime) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(l)
|
||||
}
|
||||
|
||||
func (l *TokenLifetime) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(l, data, new(session.SessionToken_Body_TokenLifetime))
|
||||
}
|
||||
|
||||
func (t *TokenBody) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(t)
|
||||
}
|
||||
|
||||
func (t *TokenBody) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(t, data, new(session.SessionToken_Body))
|
||||
}
|
||||
|
||||
func (t *Token) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(t)
|
||||
}
|
||||
|
||||
func (t *Token) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(t, data, new(session.SessionToken))
|
||||
}
|
||||
|
||||
func (x *XHeader) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(x)
|
||||
}
|
||||
|
||||
func (x *XHeader) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(x, data, new(session.XHeader))
|
||||
}
|
||||
|
||||
func (r *RequestMetaHeader) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(r)
|
||||
}
|
||||
|
||||
func (r *RequestMetaHeader) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(r, data, new(session.RequestMetaHeader))
|
||||
}
|
||||
|
||||
func (r *RequestVerificationHeader) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(r)
|
||||
}
|
||||
|
||||
func (r *RequestVerificationHeader) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(r, data, new(session.RequestVerificationHeader))
|
||||
}
|
||||
|
||||
func (r *ResponseMetaHeader) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(r)
|
||||
}
|
||||
|
||||
func (r *ResponseMetaHeader) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(r, data, new(session.ResponseMetaHeader))
|
||||
}
|
||||
|
||||
func (r *ResponseVerificationHeader) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(r)
|
||||
}
|
||||
|
||||
func (r *ResponseVerificationHeader) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(r, data, new(session.ResponseVerificationHeader))
|
||||
}
|
||||
|
||||
func (x *ContainerSessionContext) MarshalJSON() ([]byte, error) {
|
||||
return message.MarshalJSON(x)
|
||||
}
|
||||
|
||||
func (x *ContainerSessionContext) UnmarshalJSON(data []byte) error {
|
||||
return message.UnmarshalJSON(x, data, new(session.ContainerSessionContext))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue