Documentation
¶
Overview ¶
Package unit names a unit of work by its provider and the provider's key.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anchor ¶
type Anchor struct {
Unit Unit `json:"unit"`
Ref string `json:"ref"` // slack "<conversation>/<ts>"; github "review:<id>", "comment:<id>", "commit:<oid>", "situation:<kind>"; "turn:<round>"; "row:<rev>"; "draft:<id>:<kind>"
Permalink string `json:"permalink,omitempty"`
At time.Time `json:"at,omitzero"`
}
Anchor is a plugin's opaque reference to a message or event inside a unit.
type Codec ¶
type Codec interface {
Provider() ProviderID
Valid(key string) error
}
Codec validates the keys of one provider.
type OpaqueCodec ¶
type OpaqueCodec struct{ ID ProviderID }
OpaqueCodec accepts any non-blank key without a line break.
func (OpaqueCodec) Provider ¶
func (c OpaqueCodec) Provider() ProviderID
func (OpaqueCodec) Valid ¶
func (c OpaqueCodec) Valid(key string) error
type ProviderID ¶
type ProviderID string
const ( GitHub ProviderID = "github" Session ProviderID = "session" Workspace ProviderID = "workspace" )
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func (*Registry) Providers ¶
func (r *Registry) Providers() []ProviderID