forked from TrueCloudLab/frostfs-api-go
Add v2
version to go module name
Replace all elements from `v2` to root directory. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2d70391e31
commit
25da5d2e13
267 changed files with 116 additions and 17991 deletions
47
session/string.go
Normal file
47
session/string.go
Normal file
|
@ -0,0 +1,47 @@
|
|||
package session
|
||||
|
||||
import (
|
||||
session "github.com/nspcc-dev/neofs-api-go/v2/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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue