Documentation
¶
Overview ¶
Copyright © 2020 Portworx
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.
Initialization and startup files
main.go: Called from main.go in the root of the source tree. It handles the initialization of the program. root.go: Root cobra object, which is the program itself. All main commands in the handler directory register with this object. gendoc.go: Adds a hidden command to generate markdown files version.go: Adds a version command to the program
Copyright © 2019 Portworx ¶
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.
Copyright © 2020 Portworx ¶
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.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Component information ComponentName string ComponentVersion string )
Functions ¶
func GenDocAddCommand ¶
func RootAddCommand ¶
RootAddCommand is called by handlers to add the top level options to the program
func VersionAddCommand ¶
Types ¶
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component is the object managing the component
func NewComponent ¶
func NewComponent(config *ComponentConfig) *Component
NewComponent creates a new component. Once created use Execute() to start the component
type ComponentConfig ¶
type ComponentConfig struct { // Name of the component as it appears in the Usage of the help screen Name string // Version of the component Version string // Short description of the component Short string // If any flags need to be added to root of the component add them here RootFlags func(*cobra.Command) }
ComponentConfig provides the information necessary to create a component