forked from TrueCloudLab/frostfs-sdk-go
[#92] client: Add docs about status returns
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
213d20e3fb
commit
883a26d210
6 changed files with 51 additions and 21 deletions
|
@ -52,6 +52,7 @@ func (x CreateSessionRes) PublicKey() []byte {
|
|||
// The session lifetime coincides with the server lifetime. Results can be written
|
||||
// to session token which can be later attached to the requests.
|
||||
//
|
||||
// Exactly one return value is non-nil. By default, server status is returned in res structure.
|
||||
// Any client's internal or transport errors are returned as `error`.
|
||||
// If WithNeoFSErrorParsing option has been provided, unsuccessful
|
||||
// NeoFS status codes are returned as `error`, otherwise, are included
|
||||
|
@ -60,8 +61,8 @@ func (x CreateSessionRes) PublicKey() []byte {
|
|||
// Immediately panics if parameters are set incorrectly (see CreateSessionPrm docs).
|
||||
// Context is required and must not be nil. It is used for network communication.
|
||||
//
|
||||
// Exactly one return value is non-nil. Server status return is returned in CreateSessionRes.
|
||||
// Reflects all internal errors in second return value (transport problems, response processing, etc.).
|
||||
// Return statuses:
|
||||
// - global (see Client docs).
|
||||
func (c *Client) CreateSession(ctx context.Context, prm CreateSessionPrm) (*CreateSessionRes, error) {
|
||||
// check context
|
||||
if ctx == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue