github.com/containerd/nerdctl@v1.7.7/pkg/api/types/namespace_types.go (about)

     1  /*
     2     Copyright The containerd Authors.
     3  
     4     Licensed under the Apache License, Version 2.0 (the "License");
     5     you may not use this file except in compliance with the License.
     6     You may obtain a copy of the License at
     7  
     8         http://www.apache.org/licenses/LICENSE-2.0
     9  
    10     Unless required by applicable law or agreed to in writing, software
    11     distributed under the License is distributed on an "AS IS" BASIS,
    12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13     See the License for the specific language governing permissions and
    14     limitations under the License.
    15  */
    16  
    17  package types
    18  
    19  import "io"
    20  
    21  // NamespaceCreateOptions specifies options for `nerdctl namespace create`.
    22  type NamespaceCreateOptions struct {
    23  	GOptions GlobalCommandOptions
    24  	// Labels are the namespace labels
    25  	Labels []string
    26  }
    27  
    28  // NamespaceUpdateOptions specifies options for `nerdctl namespace update`.
    29  type NamespaceUpdateOptions NamespaceCreateOptions
    30  
    31  // NamespaceRemoveOptions specifies options for `nerdctl namespace rm`.
    32  type NamespaceRemoveOptions struct {
    33  	Stdout   io.Writer
    34  	GOptions GlobalCommandOptions
    35  	// CGroup delete the namespace's cgroup
    36  	CGroup bool
    37  }
    38  
    39  // NamespaceInspectOptions specifies options for `nerdctl namespace inspect`.
    40  type NamespaceInspectOptions struct {
    41  	Stdout   io.Writer
    42  	GOptions GlobalCommandOptions
    43  	// Format the output using the given Go template, e.g, '{{json .}}'
    44  	Format string
    45  }