docs

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Overview

Package docs defines provider/service interface to handle code documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForEach

func ForEach(onElem func(name string, provider Provider))

func Register

func Register(name string, provider Provider)

Types

type Connector

type Connector interface {
	DB() (*sql.DB, error)
}

type Option

type Option func(o *Options)

func WithConnector

func WithConnector(connector Connector) Option

func WithURL

func WithURL(URL string) Option

type Options

type Options struct {
	URL       string
	Connector Connector
}

type Provider

type Provider interface {
	Service(ctx context.Context, options ...Option) (Service, error)
}

func Lookup

func Lookup(name string) Provider

type Registry

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

func New

func New() *Registry

func (*Registry) ForEach

func (r *Registry) ForEach(onElem func(name string, provider Provider))

func (*Registry) Lookup

func (r *Registry) Lookup(name string) Provider

func (*Registry) Register

func (r *Registry) Register(name string, provider Provider)

type Service

type Service interface {
	Lookup(ctx context.Context, key string) (string, bool, error)
}

Jump to

Keyboard shortcuts

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