cli

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAction added in v0.3.0

func CreateAction(portClient *PortClient, action port.Action) (*port.Action, error)

func CreateBlueprint added in v0.1.15

func CreateBlueprint(portClient *PortClient, blueprint port.Blueprint) (*port.Blueprint, error)

func DeleteAction added in v0.3.1

func DeleteAction(portClient *PortClient, actionIdentifier string) error

func DeleteBlueprint added in v0.1.15

func DeleteBlueprint(portClient *PortClient, blueprintIdentifier string) error

func GetAction added in v0.3.0

func GetAction(portClient *PortClient, actionIdentifier string) (*port.Action, error)

func GetBlueprint added in v0.1.15

func GetBlueprint(portClient *PortClient, blueprintIdentifier string) (*port.Blueprint, error)

func PatchBlueprint added in v0.1.15

func PatchBlueprint(portClient *PortClient, blueprint port.Blueprint) (*port.Blueprint, error)

func UpdateAction added in v0.3.0

func UpdateAction(portClient *PortClient, action port.Action) (*port.Action, error)

Types

type Option

type Option func(*PortClient)

func WithClientID

func WithClientID(clientID string) Option

func WithClientSecret

func WithClientSecret(clientSecret string) Option

func WithCreateMissingRelatedEntities added in v0.1.9

func WithCreateMissingRelatedEntities(createMissingRelatedEntities bool) Option

func WithDeleteDependents added in v0.1.6

func WithDeleteDependents(deleteDependents bool) Option

func WithHeader

func WithHeader(key, val string) Option

type PortClient

type PortClient struct {
	Client                       *resty.Client
	ClientID                     string
	ClientSecret                 string
	DeleteDependents             bool
	CreateMissingRelatedEntities bool
}

func New

func New(baseURL string, opts ...Option) (*PortClient, error)

func (*PortClient) Authenticate

func (c *PortClient) Authenticate(ctx context.Context, clientID, clientSecret string) (string, error)

func (*PortClient) CreateEntity

func (c *PortClient) CreateEntity(ctx context.Context, e *port.Entity, runID string, createMissingRelatedEntities bool) (*port.Entity, error)

func (*PortClient) CreateIntegration added in v0.1.13

func (c *PortClient) CreateIntegration(i *port.Integration) (*port.Integration, error)

func (*PortClient) CreatePage added in v0.2.7

func (c *PortClient) CreatePage(p port.Page) error

func (*PortClient) CreateScorecard added in v0.1.15

func (c *PortClient) CreateScorecard(blueprintIdentifier string, scorecard port.Scorecard) (*port.Scorecard, error)

func (*PortClient) DeleteEntity

func (c *PortClient) DeleteEntity(ctx context.Context, id string, blueprint string, deleteDependents bool) error

func (*PortClient) DeleteIntegration added in v0.1.15

func (c *PortClient) DeleteIntegration(stateKey string) error

func (*PortClient) DeletePage added in v0.2.7

func (c *PortClient) DeletePage(identifier string) error

func (*PortClient) DeleteStaleEntities added in v0.1.6

func (c *PortClient) DeleteStaleEntities(ctx context.Context, stateKey string, existingEntitiesSet map[string]interface{}) error

func (*PortClient) GetEntityIdentifierKey added in v0.1.6

func (c *PortClient) GetEntityIdentifierKey(portEntity *port.Entity) string

func (*PortClient) GetIntegration added in v0.1.15

func (c *PortClient) GetIntegration(stateKey string) (*port.Integration, error)

func (*PortClient) GetKafkaCredentials added in v0.1.15

func (c *PortClient) GetKafkaCredentials() (*port.OrgKafkaCredentials, error)

func (*PortClient) GetOrgId added in v0.1.15

func (c *PortClient) GetOrgId() (string, error)

func (*PortClient) GetPage added in v0.2.7

func (c *PortClient) GetPage(identifier string) (*port.Page, error)

func (*PortClient) PatchIntegration added in v0.1.15

func (c *PortClient) PatchIntegration(stateKey string, integration *port.Integration) error

func (*PortClient) ReadEntity

func (c *PortClient) ReadEntity(ctx context.Context, id string, blueprint string) (*port.Entity, error)

func (*PortClient) SearchEntities added in v0.1.6

func (c *PortClient) SearchEntities(ctx context.Context, body port.SearchBody) ([]port.Entity, error)

Jump to

Keyboard shortcuts

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