vib

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README

vib

Vib (pronounced "vibe") allows users to intuitively manage their bash environment across all their platforms. The name "vib" comes from the contraction of vi ~/.bash_profile.

Install vib

go install github.com/alexandremahdhaoui/vib/cmd/vib@v0.0.3
vib --help

vib's commands

Command Description
Get Returns the Resource Definition of the specified Kind. Works like kubectl get, meaning that we can get the full yaml definition or just a list of defined kinds. We could also get the templated results of the specified kinds.
Create Create a new instance of the specified Kind
Edit Edit a specific Resource Definition.
Delete Deletes a Resource Definition from vib.
Apply Apply resource definitions or a list of files to vib.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v interface{})

func DefaultResolver

func DefaultResolver(apiVersion api.APIVersion) ([]*api.ResourceDefinition, error)

func ErrCannotTypeAssertKind

func ErrCannotTypeAssertKind(kind api.Kind) error

func JoinLine

func JoinLine(buffer string, line string) string

func Render

func Render(resource *api.ResourceDefinition, server api.APIServer) (string, error)

func RenderExpression

func RenderExpression(resource *api.ResourceDefinition, server api.APIServer) (string, error)

func RenderExpressionSet

func RenderExpressionSet(resource *api.ResourceDefinition, server api.APIServer) (string, error)

func RenderProfile

func RenderProfile(resource *api.ResourceDefinition, server api.APIServer) (string, error)

func RenderSet

func RenderSet(resource *api.ResourceDefinition, server api.APIServer) (string, error)

func Resolve

func Resolve(resource *api.ResourceDefinition, key, value string) (string, error)

func ResolveExec

func ResolveExec(resolver *v1alpha1.ResolverSpec, key, value string) (string, error)

Render TODO: Figure out how to use the key and values when rendering an Exec command.

func ResolveFmt

func ResolveFmt(resolver *v1alpha1.ResolverSpec, key, value string) (string, error)

func ResolveGotemplate

func ResolveGotemplate(resolver *v1alpha1.ResolverSpec, key, value string) (string, error)

func ResolvePlain

func ResolvePlain(_ *v1alpha1.ResolverSpec, key, _ string) (string, error)

ResolvePlain returns the key

func ToPointer

func ToPointer[T any](t T) *T

Types

type Renderer

type Renderer interface {
	Render(server api.APIServer) (string, error)
}

type Resolver

type Resolver interface {
	Resolve(key, value string) (string, error)
}

Directories

Path Synopsis
cmd
vib
pkg
api

Jump to

Keyboard shortcuts

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