mkcert

package
v0.9.11 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 10 Imported by: 0

README

POSH doctl provider

Usage

Plugin
package main

type Plugin struct {
  l        log.Logger
  commands command.Commands
}

func New(l log.Logger) (plugin.Plugin, error) {
  var err error
  inst := &Plugin{
    l:        l,
    commands: command.Commands{},
  }

  // ...

  inst.Commands().MustAdd(mkcert.NewCommand(l))

  // ...

  return inst, nil
}
Config
## mkcert
mkcert:
  certificatePath: .posh/config/certs
  certificates:
    - name: foomo.org
      names:
        - foomo.org
        - *.foomo.org
        - localhost
        - 127.0.0.1
        - ::1
Ownbrew

To install binary locally, add:

ownbrew:
  packages:
    ## https://github.com/FiloSottile/mkcert/releases
    - name: mkcert
      tap: foomo/filosottile/mkcert
      version: 1.4.4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Name  string   `yaml:"name"`
	Names []string `yaml:"names"`
}

type Command

type Command struct {
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(l log.Logger, opts ...Option) (*Command, error)

func (*Command) Complete

func (c *Command) Complete(ctx context.Context, r *readline.Readline) []goprompt.Suggest

func (*Command) Description

func (c *Command) Description() string

func (*Command) Execute

func (c *Command) Execute(ctx context.Context, r *readline.Readline) error

func (*Command) Help

func (c *Command) Help(ctx context.Context, r *readline.Readline) string

func (*Command) Name

func (c *Command) Name() string

func (*Command) Validate

func (c *Command) Validate(ctx context.Context, r *readline.Readline) error

type Config

type Config struct {
	CertificatePath string        `yaml:"certificatePath"`
	Certificates    []Certificate `yaml:"certificates"`
}

type Option

type Option func(*Command) error

func CommandWithName

func CommandWithName(v string) Option

func WithConfigKey

func WithConfigKey(v string) Option

Jump to

Keyboard shortcuts

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