Files
posh-providers/arbitrary/open
2026-10-14 17:06:11 +02:00
..
2026-08-19 11:29:32 +02:00
2026-10-14 15:34:59 +02:00
2026-08-19 11:29:32 +02:00
2026-10-14 15:34:59 +02:00
2026-10-14 17:06:11 +02:00
2026-10-14 15:34:59 +02:00
2023-12-05 14:10:17 +01:00
2026-08-24 08:36:46 +02:00

POSH open provider

Define and open common URL from the posh.

Usage

Plugin

package main

type Plugin struct {
  l        log.Logger
  op       *onepassword.OnePassword
  cache    cache.Cache
  commands command.Commands
}

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

  // ...

  inst.op, err = onepassword.New(l, inst.cache)
  if err != nil {
    return nil, errors.Wrap(err, "failed to create onepassword")
  }

	// ...

  inst.commands.MustAdd(open.NewCommand(l, inst.op))

  // ...

  return inst, nil
}

Config

## Open
open:
  homepage:
    description: Home page
    routes:
      home:
        path: https://www.foomo.org/
        description: Home
      imprint:
        path: https://www.foomo.org/imprint
        description: Imprint
        basicAuth:
          item: xxxxxxxxxxxxxxxxxxxxxxxxxx
          vault: xxxxxxxxxxxxxxxxxxxxxxxxxx
          account: foomo