services

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccessRequestInitStatus               = "Initializing"
	AccessRequestPendingStatus            = "Pending"
	AccessRequestGrantingStatus           = "Granting"
	AccessRequestRejectedStatus           = "Rejected"
	AccessRequestActiveStatus             = "Active"
	AccessRequestRevokingStatus           = "Revoking"
	AccessRequestRevokedStatus            = "Revoked"
	AccessRequestFailedStatus             = "Failed"
	AccessRequestWaitingForApprovalStatus = "Pending Approval"
)
View Source
const (
	CliOutputFormat          = "cli"
	LinkOutputFormat         = "link"
	InstructionsOutputFormat = "instructions"
	JSONOutputFormat         = "json"
)

Variables

This section is empty.

Functions

func ColoredStatus

func ColoredStatus(request clientapi.AccessRequestClientModel) string

func ExecuteAccessDetails

func ExecuteAccessDetails(cobraCmd *cobra.Command, client *aponoapi.AponoClient, session *clientapi.AccessSessionClientModel) error

func GetBundleByNameOrID

func GetBundleByNameOrID(ctx context.Context, client *aponoapi.AponoClient, bundleNameOrID string) (*clientapi.BundleClientModel, error)

func GetEmptyNewRequestAPIModel

func GetEmptyNewRequestAPIModel() *clientapi.CreateAccessRequestClientModel

func GetIntegrationByIDOrByTypeAndName

func GetIntegrationByIDOrByTypeAndName(ctx context.Context, client *aponoapi.AponoClient, integrationIDOrName string) (*clientapi.IntegrationClientModel, error)

func GetResourceTypeByID

func GetResourceTypeByID(ctx context.Context, client *aponoapi.AponoClient, integrationID string, resourceTypeID string) (*clientapi.ResourceTypeClientModel, error)

func IsRequestWaitingForHumanApproval

func IsRequestWaitingForHumanApproval(request *clientapi.AccessRequestClientModel) bool

func IsSessionHaveNewCredentials

func IsSessionHaveNewCredentials(session *clientapi.AccessSessionClientModel) bool

func ListAccessRequestAccessUnits

func ListAccessRequestAccessUnits(ctx context.Context, client *aponoapi.AponoClient, requestID string) ([]clientapi.AccessUnitClientModel, error)

func ListAccessSessions

func ListAccessSessions(ctx context.Context, client *aponoapi.AponoClient, integrationIds []string, bundleIds []string, requestIds []string) ([]clientapi.AccessSessionClientModel, error)

func ListBundles

func ListBundles(ctx context.Context, client *aponoapi.AponoClient, search string) ([]clientapi.BundleClientModel, error)

func ListPermissions

func ListPermissions(ctx context.Context, client *aponoapi.AponoClient, integrationID string, resourceType string) ([]clientapi.PermissionClientModel, error)

func ListRequests

func ListRequests(ctx context.Context, client *aponoapi.AponoClient, daysOffset int64) ([]clientapi.AccessRequestClientModel, error)

func ListResourceFiltersFromResourcesIDs

func ListResourceFiltersFromResourcesIDs(resourcesIDs []string) []clientapi.ResourceFilter

func ListResourceTypes

func ListResourceTypes(ctx context.Context, client *aponoapi.AponoClient, integrationID string) ([]clientapi.ResourceTypeClientModel, error)

func ListResources

func ListResources(ctx context.Context, client *aponoapi.AponoClient, integrationID string, resourceType string, sourceIDs []string) ([]clientapi.ResourceClientModel, error)

func ListResourcesBySourceIDs

func ListResourcesBySourceIDs(ctx context.Context, client *aponoapi.AponoClient, integrationID string, resourceType string, sourceIDs []string) ([]clientapi.ResourceClientModel, error)

func PrintAccessRequests

func PrintAccessRequests(cmd *cobra.Command, requests []clientapi.AccessRequestClientModel, format utils.Format, printAsArray bool) error

func PrintAccessSessions

func PrintAccessSessions(cmd *cobra.Command, sessions []clientapi.AccessSessionClientModel, format *utils.Format) error

func PrintCustomInstructionMessage added in v1.0.3

func PrintCustomInstructionMessage(cmd *cobra.Command, customInstructionMessage CustomInstructionMessage) error

func RevokeRequest

func RevokeRequest(ctx context.Context, client *aponoapi.AponoClient, requestID string) error

func WaitForNewRequest

func WaitForNewRequest(ctx context.Context, client *aponoapi.AponoClient, creationTime time.Time, timeout time.Duration) (*clientapi.AccessRequestClientModel, error)

Types

type CustomInstructionMessage added in v1.0.3

type CustomInstructionMessage = string

func GetSessionDetails

func GetSessionDetails(ctx context.Context, client *aponoapi.AponoClient, sessionID string, outputFormat string) (string, CustomInstructionMessage, error)

Jump to

Keyboard shortcuts

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