playbookdispatcher

package
v0.0.0-...-4ff1ea1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

FIXME: golangci-lint nolint:errcheck,govet,revive

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the implementation of an ClientInterface

func InitClient

func InitClient(ctx context.Context, log log.FieldLogger) *Client

InitClient initializes the client for Image Builder

func (*Client) ExecuteDispatcher

func (c *Client) ExecuteDispatcher(payload DispatcherPayload) ([]Response, error)

ExecuteDispatcher executes a DispatcherPayload, sending it to playbook dispatcher

type ClientInterface

type ClientInterface interface {
	ExecuteDispatcher(payload DispatcherPayload) ([]Response, error)
}

ClientInterface is an Interface to make requests to PlaybookDispatcher

type DispatcherPayload

type DispatcherPayload struct {
	Recipient   string `json:"recipient"`
	PlaybookURL string `json:"url"`
	OrgID       string `json:"org_id"`
	// Principal is the Username of the user interacting with the service
	Principal string `json:"principal"`
	// Human readable name of the playbook run. Used to present the given playbook run in external systems (Satellite)
	PlaybookName string `json:"name"`
}

DispatcherPayload represents the payload sent to playbook dispatcher as per https://github.com/RedHatInsights/playbook-dispatcher/blob/master/schema/private.openapi.yaml RunInputV2

type Response

type Response struct {
	StatusCode           int    `json:"code"`
	PlaybookDispatcherID string `json:"id"`
}

Response represents the response retrieved by playbook dispatcher

Directories

Path Synopsis
Package mock_playbookdispatcher is a generated GoMock package.
Package mock_playbookdispatcher is a generated GoMock package.

Jump to

Keyboard shortcuts

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