From cae2f37cddd198874d6a47c7c5bae07056a81147 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 17 Apr 2023 10:31:07 +0300 Subject: [PATCH] client: rename formRequest() to buildRequest() Signed-off-by: Evgenii Stratonikov --- client/container_delete.go | 4 ++-- client/container_eacl.go | 4 ++-- client/container_get.go | 4 ++-- client/container_list.go | 4 ++-- client/container_put.go | 4 ++-- client/container_set_eacl.go | 4 ++-- client/container_space.go | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/client/container_delete.go b/client/container_delete.go index 3567bbed..0059988d 100644 --- a/client/container_delete.go +++ b/client/container_delete.go @@ -34,7 +34,7 @@ func (x *PrmContainerDelete) SetContainer(id cid.ID) { x.idSet = true } -func (x *PrmContainerDelete) formRequest(c *Client) (*v2container.DeleteRequest, error) { +func (x *PrmContainerDelete) buildRequest(c *Client) (*v2container.DeleteRequest, error) { if !x.idSet { return nil, errorMissingContainer } @@ -114,7 +114,7 @@ type ResContainerDelete struct { // Return statuses: // - global (see Client docs). func (c *Client) ContainerDelete(ctx context.Context, prm PrmContainerDelete) (*ResContainerDelete, error) { - req, err := prm.formRequest(c) + req, err := prm.buildRequest(c) if err != nil { return nil, err } diff --git a/client/container_eacl.go b/client/container_eacl.go index 187a5f63..8f8e6513 100644 --- a/client/container_eacl.go +++ b/client/container_eacl.go @@ -30,7 +30,7 @@ func (x *PrmContainerEACL) SetContainer(id cid.ID) { x.idSet = true } -func (x *PrmContainerEACL) formRequest(c *Client) (*v2container.GetExtendedACLRequest, error) { +func (x *PrmContainerEACL) buildRequest(c *Client) (*v2container.GetExtendedACLRequest, error) { if !x.idSet { return nil, errorMissingContainer } @@ -75,7 +75,7 @@ func (x ResContainerEACL) Table() eacl.Table { // - *apistatus.ContainerNotFound; // - *apistatus.EACLNotFound. func (c *Client) ContainerEACL(ctx context.Context, prm PrmContainerEACL) (*ResContainerEACL, error) { - req, err := prm.formRequest(c) + req, err := prm.buildRequest(c) if err != nil { return nil, err } diff --git a/client/container_get.go b/client/container_get.go index 2d2d2cb8..9e985233 100644 --- a/client/container_get.go +++ b/client/container_get.go @@ -31,7 +31,7 @@ func (x *PrmContainerGet) SetContainer(id cid.ID) { x.idSet = true } -func (x *PrmContainerGet) formRequest(c *Client) (*v2container.GetRequest, error) { +func (x *PrmContainerGet) buildRequest(c *Client) (*v2container.GetRequest, error) { if !x.idSet { return nil, errorMissingContainer } @@ -77,7 +77,7 @@ func (x ResContainerGet) Container() container.Container { // - global (see Client docs); // - *apistatus.ContainerNotFound. func (c *Client) ContainerGet(ctx context.Context, prm PrmContainerGet) (*ResContainerGet, error) { - req, err := prm.formRequest(c) + req, err := prm.buildRequest(c) if err != nil { return nil, err } diff --git a/client/container_list.go b/client/container_list.go index 9274e30c..eb8cc885 100644 --- a/client/container_list.go +++ b/client/container_list.go @@ -30,7 +30,7 @@ func (x *PrmContainerList) SetAccount(id user.ID) { x.ownerSet = true } -func (x *PrmContainerList) formRequest(c *Client) (*v2container.ListRequest, error) { +func (x *PrmContainerList) buildRequest(c *Client) (*v2container.ListRequest, error) { if !x.ownerSet { return nil, errorAccountNotSet } @@ -75,7 +75,7 @@ func (x ResContainerList) Containers() []cid.ID { // Return statuses: // - global (see Client docs). func (c *Client) ContainerList(ctx context.Context, prm PrmContainerList) (*ResContainerList, error) { - req, err := prm.formRequest(c) + req, err := prm.buildRequest(c) if err != nil { return nil, err } diff --git a/client/container_put.go b/client/container_put.go index e2bf2209..630d265b 100644 --- a/client/container_put.go +++ b/client/container_put.go @@ -48,7 +48,7 @@ func (x *PrmContainerPut) WithinSession(s session.Container) { x.sessionSet = true } -func (x *PrmContainerPut) formRequest(c *Client) (*v2container.PutRequest, error) { +func (x *PrmContainerPut) buildRequest(c *Client) (*v2container.PutRequest, error) { if !x.cnrSet { return nil, errorMissingContainer } @@ -122,7 +122,7 @@ func (x ResContainerPut) ID() cid.ID { // // nolint: funlen func (c *Client) ContainerPut(ctx context.Context, prm PrmContainerPut) (*ResContainerPut, error) { - req, err := prm.formRequest(c) + req, err := prm.buildRequest(c) if err != nil { return nil, err } diff --git a/client/container_set_eacl.go b/client/container_set_eacl.go index 5fea5fb9..19173733 100644 --- a/client/container_set_eacl.go +++ b/client/container_set_eacl.go @@ -50,7 +50,7 @@ func (x *PrmContainerSetEACL) WithinSession(s session.Container) { x.sessionSet = true } -func (x *PrmContainerSetEACL) formRequest(c *Client) (*v2container.SetExtendedACLRequest, error) { +func (x *PrmContainerSetEACL) buildRequest(c *Client) (*v2container.SetExtendedACLRequest, error) { if !x.tableSet { return nil, errorEACLTableNotSet } @@ -111,7 +111,7 @@ type ResContainerSetEACL struct { // Return statuses: // - global (see Client docs). func (c *Client) ContainerSetEACL(ctx context.Context, prm PrmContainerSetEACL) (*ResContainerSetEACL, error) { - req, err := prm.formRequest(c) + req, err := prm.buildRequest(c) if err != nil { return nil, err } diff --git a/client/container_space.go b/client/container_space.go index d50944f1..af984e5e 100644 --- a/client/container_space.go +++ b/client/container_space.go @@ -27,7 +27,7 @@ func (x *PrmAnnounceSpace) SetValues(vs []container.SizeEstimation) { x.announcements = vs } -func (x *PrmAnnounceSpace) formRequest(c *Client) (*v2container.AnnounceUsedSpaceRequest, error) { +func (x *PrmAnnounceSpace) buildRequest(c *Client) (*v2container.AnnounceUsedSpaceRequest, error) { if len(x.announcements) == 0 { return nil, errorMissingAnnouncements } @@ -70,7 +70,7 @@ type ResAnnounceSpace struct { // Return statuses: // - global (see Client docs). func (c *Client) ContainerAnnounceUsedSpace(ctx context.Context, prm PrmAnnounceSpace) (*ResAnnounceSpace, error) { - req, err := prm.formRequest(c) + req, err := prm.buildRequest(c) if err != nil { return nil, err }