Documentation
¶
Index ¶
- func DecodeWebhook(provider, secret string, headers http.Header, payload []byte) (forge.Event, error)
- func PrivateConnection(r connections.Resolved) privateconnector.Connection
- func RegisterPrivate(service *connections.Service, connector *privateconnector.Connector, ...)
- type Client
- type Factory
- func (f Factory) Catalog(ctx context.Context, r connections.Resolved) ([]connections.CatalogItem, error)
- func (f Factory) Forge(ctx context.Context, r connections.Resolved, ...) (forge.Provider, error)
- func (f Factory) Model(r connections.Resolved) (model.ModelProvider, error)
- func (f Factory) Probe(ctx context.Context, r connections.Resolved) (connections.ProbeResult, error)
- func (f Factory) Register(service *connections.Service)
- type Service
- func (s Service) ForExecution() *Service
- func (s Service) ForProtection(id string, publishers map[string]string) Client
- func (s *Service) Read(ctx context.Context, orgID, connectionID string, op privateconnector.Operation, ...) (privateconnector.Result, error)
- func (s *Service) SourceReader(org, connection string, ...) source.Reader
- func (s *Service) Write(ctx context.Context, org, id string, op privateconnector.Operation, ...) (privateconnector.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeWebhook ¶
func PrivateConnection ¶
func PrivateConnection(r connections.Resolved) privateconnector.Connection
func RegisterPrivate ¶
func RegisterPrivate(service *connections.Service, connector *privateconnector.Connector, runners *runner.Service)
Types ¶
type Client ¶
type Client interface {
Read(context.Context, string, string, privateconnector.Operation, func(context.Context, pgx.Tx, connections.Connection) error) (privateconnector.Result, error)
Write(context.Context, string, string, privateconnector.Operation, func(context.Context, pgx.Tx, connections.Connection) (string, error), func(context.Context, pgx.Tx, connections.Connection) error) (privateconnector.Result, error)
SourceReader(string, string, func(context.Context, pgx.Tx, connections.Connection) error) source.Reader
ForProtection(string, map[string]string) Client
}
type Factory ¶
type Factory struct{ Development bool }
func (Factory) Catalog ¶
func (f Factory) Catalog(ctx context.Context, r connections.Resolved) ([]connections.CatalogItem, error)
func (Factory) Model ¶
func (f Factory) Model(r connections.Resolved) (model.ModelProvider, error)
func (Factory) Probe ¶
func (f Factory) Probe(ctx context.Context, r connections.Resolved) (connections.ProbeResult, error)
func (Factory) Register ¶
func (f Factory) Register(service *connections.Service)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶
func New(db *store.Store, connections *connections.Service, private *privateconnector.Connector, runners *runner.Service, development bool) *Service
func (Service) ForExecution ¶
func (Service) ForProtection ¶
func (*Service) Read ¶
func (s *Service) Read(ctx context.Context, orgID, connectionID string, op privateconnector.Operation, authorize func(context.Context, pgx.Tx, connections.Connection) error) (privateconnector.Result, error)
func (*Service) SourceReader ¶
func (*Service) Write ¶
func (s *Service) Write(ctx context.Context, org, id string, op privateconnector.Operation, authorize func(context.Context, pgx.Tx, connections.Connection) (string, error), validate func(context.Context, pgx.Tx, connections.Connection) error) (privateconnector.Result, error)
Click to show internal directories.
Click to hide internal directories.