cobra-k8s-selectors

command module
v0.0.0-...-8e05508 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

cobra-k8s-selectors

Cobra with K8s field and label selectors for filtering a list of objects.

Using k8s.io/apimachinery

The difference between a field selector and a label selector is that a field selector is a simple set of field == value matchers, while a label selector allows for more complex expressions like field > num, !field or field in (val1, val2).

The app architecture is hexagonal (ports and adapters), good references for that are:

Project layout is inspired by standard go layout.

Documentation

Overview

Copyright © 2020 mig4

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
pkg
cks
cks package contains the core application business logic.
cks package contains the core application business logic.
swapi
swapi package implements some object types that are manipulated by our hypothetical API used for this experiment and exposes a Port (interface) for a repository of those objects, as well as a simple in-memory Adapter (implementation) of that repository.
swapi package implements some object types that are manipulated by our hypothetical API used for this experiment and exposes a Port (interface) for a repository of those objects, as well as a simple in-memory Adapter (implementation) of that repository.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL