posh-providers/oven-sh/bun/README.md
2025-01-10 07:20:20 +01:00

442 B

POSH bun provider

Usage

Plugin

package main

type Plugin struct {
  l        log.Logger
  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.commands.Add(bun.NewCommand(l, inst.cache))

  // ...

  return inst, nil
}