frostfs-sdk-go/apiv2/session/string.go
Pavel Pogodaev 7ef502e2c0
Some checks failed
/ DCO (pull_request) Failing after 14s
/ Lint (pull_request) Failing after 1m23s
/ Tests (pull_request) Failing after 29s
[] Merge repo with frostfs-api-go
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
2024-10-07 17:20:25 +03:00

47 lines
1.1 KiB
Go

package session
import (
session "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/apiv2/session/grpc"
)
// String returns string representation of ObjectSessionVerb.
func (x ObjectSessionVerb) String() string {
return ObjectSessionVerbToGRPCField(x).String()
}
// FromString parses ObjectSessionVerb from a string representation.
// It is a reverse action to String().
//
// Returns true if s was parsed successfully.
func (x *ObjectSessionVerb) FromString(s string) bool {
var g session.ObjectSessionContext_Verb
ok := g.FromString(s)
if ok {
*x = ObjectSessionVerbFromGRPCField(g)
}
return ok
}
// String returns string representation of ContainerSessionVerb.
func (x ContainerSessionVerb) String() string {
return ContainerSessionVerbToGRPCField(x).String()
}
// FromString parses ContainerSessionVerb from a string representation.
// It is a reverse action to String().
//
// Returns true if s was parsed successfully.
func (x *ContainerSessionVerb) FromString(s string) bool {
var g session.ContainerSessionContext_Verb
ok := g.FromString(s)
if ok {
*x = ContainerSessionVerbFromGRPCField(g)
}
return ok
}