1- package namespaces
1+ package containerd
22
33import (
44 "context"
@@ -10,16 +10,16 @@ import (
1010 "github.com/gogo/protobuf/types"
1111)
1212
13- // NewStoreFromClient returns a new namespace store
14- func NewStoreFromClient (client api.NamespacesClient ) namespaces.Store {
15- return & remote {client : client }
13+ // NewNamespaceStoreFromClient returns a new namespace store
14+ func NewNamespaceStoreFromClient (client api.NamespacesClient ) namespaces.Store {
15+ return & remoteNamespaces {client : client }
1616}
1717
18- type remote struct {
18+ type remoteNamespaces struct {
1919 client api.NamespacesClient
2020}
2121
22- func (r * remote ) Create (ctx context.Context , namespace string , labels map [string ]string ) error {
22+ func (r * remoteNamespaces ) Create (ctx context.Context , namespace string , labels map [string ]string ) error {
2323 var req api.CreateNamespaceRequest
2424
2525 req .Namespace = api.Namespace {
@@ -35,7 +35,7 @@ func (r *remote) Create(ctx context.Context, namespace string, labels map[string
3535 return nil
3636}
3737
38- func (r * remote ) Labels (ctx context.Context , namespace string ) (map [string ]string , error ) {
38+ func (r * remoteNamespaces ) Labels (ctx context.Context , namespace string ) (map [string ]string , error ) {
3939 var req api.GetNamespaceRequest
4040 req .Name = namespace
4141
@@ -47,7 +47,7 @@ func (r *remote) Labels(ctx context.Context, namespace string) (map[string]strin
4747 return resp .Namespace .Labels , nil
4848}
4949
50- func (r * remote ) SetLabel (ctx context.Context , namespace , key , value string ) error {
50+ func (r * remoteNamespaces ) SetLabel (ctx context.Context , namespace , key , value string ) error {
5151 var req api.UpdateNamespaceRequest
5252
5353 req .Namespace = api.Namespace {
@@ -67,7 +67,7 @@ func (r *remote) SetLabel(ctx context.Context, namespace, key, value string) err
6767 return nil
6868}
6969
70- func (r * remote ) List (ctx context.Context ) ([]string , error ) {
70+ func (r * remoteNamespaces ) List (ctx context.Context ) ([]string , error ) {
7171 var req api.ListNamespacesRequest
7272
7373 resp , err := r .client .List (ctx , & req )
@@ -84,7 +84,7 @@ func (r *remote) List(ctx context.Context) ([]string, error) {
8484 return namespaces , nil
8585}
8686
87- func (r * remote ) Delete (ctx context.Context , namespace string ) error {
87+ func (r * remoteNamespaces ) Delete (ctx context.Context , namespace string ) error {
8888 var req api.DeleteNamespaceRequest
8989
9090 req .Name = namespace
0 commit comments