conductoronesdkgo

package module
v1.21.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 31 Imported by: 2

README

conductorone-api

Summary

ConductorOne API: The ConductorOne API is a HTTP API for managing ConductorOne resources.

Table of Contents

SDK Installation

To add the SDK as a dependency to your project:

go get github.com/ConductorOne/conductorone-sdk-go

SDK Example Usage

Example
package main

import (
	"context"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go/v2"
	"github.com/conductorone/conductorone-sdk-go/v2/pkg/models/shared"
	"log"
)

func main() {
	ctx := context.Background()

	s := NewWithCredentials(ctx, &ClientCredentials{
		ClientID:     "",
		ClientSecret: "",
	} )

	res, err := s.Apps.Create(ctx, &shared.CreateAppRequest{
		Owners: []string{
			"string",
		},
	})
	if err != nil {
		log.Fatal(err)
	}

	if res.CreateAppResponse != nil {
		// handle response
	}
}

Available Resources and Operations

Available methods
AppAccessRequestsDefaults
AppEntitlementOwners
AppEntitlements
AppEntitlementSearch
AppEntitlementsProxy
AppEntitlementUserBinding
AppOwners
AppReport
AppReportAction
AppResource
AppResourceOwners
AppResourceSearch
AppResourceType
Apps
AppSearch
AppUsageControls
AppUser
Attributes
AttributeSearch
Auth
AWSExternalIDSettings
Connector
Directory
Export
ExportsSearch
PersonalClient
PersonalClientSearch
  • Search - NOTE: Searches personal clients for all users
Policies
PolicySearch
PolicyValidate
RequestCatalogManagement
RequestCatalogSearch
Roles
SessionSettings
SystemLog
Task
TaskActions
TaskSearch
User
UserSearch
Webhooks
WebhooksSearch

Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass.

Error Object Status Code Content Type
sdkerrors.SDKError 400-600 /
Example
package main

import (
	"context"
	"errors"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go/v2"
	"github.com/conductorone/conductorone-sdk-go/v2/pkg/models/sdkerrors"
	"github.com/conductorone/conductorone-sdk-go/v2/pkg/models/shared"
	"log"
)

func main() {
	ctx := context.Background()

	s := NewWithCredentials(ctx, &ClientCredentials{
		ClientID:     "",
		ClientSecret: "",
	})
	res, err := s.Apps.Create(ctx, &shared.CreateAppRequest{
		Owners: []string{
			"string",
		},
	})
	if err != nil {

		var e *sdkerrors.SDKError
		if errors.As(err, &e) {
			// handle error
			log.Fatal(e.Error())
		}
	}
}

SDK Example Usage with Custom Server/Tenant

Example
package main

import (
	"context"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go/v2"
	"github.com/conductorone/conductorone-sdk-go/v2/pkg/models/shared"
	"log"
)

func main() {
	ctx := context.Background()

	/* Optional Override 
	* Server URL will be extracted from client, optionally, you can
	* provide a server URL or a tenant domain (will create URL https://{tenant_domain}.conductor.one) 
	*/
	opts := []sdk.CustomSDKOption{}
	opt, _ := sdk.WithTenantCustom("Server URL or Tenant Domain")
	opts = append(opts, opt)

	s := NewWithCredentials(ctx, &ClientCredentials{
		ClientID:     "",
		ClientSecret: "",
	} opts...)

	res, err := s.Apps.Create(ctx, &shared.CreateAppRequest{
		Owners: []string{
			"string",
		},
	})
	if err != nil {
		log.Fatal(err)
	}

	if res.CreateAppResponse != nil {
		// handle response
	}
}

Retries

Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

To change the default retry strategy for a single API call, simply provide a retry.Config object to the call by using the WithRetries option:

package main

import (
	"context"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
	"github.com/conductorone/conductorone-sdk-go/pkg/retry"
	"log"
	"pkg/models/operations"
)

func main() {
	s := conductoronesdkgo.New(
		conductoronesdkgo.WithSecurity(shared.Security{
			BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
			Oauth:      "<YOUR_OAUTH_HERE>",
		}),
	)

	ctx := context.Background()
	res, err := s.Apps.Create(ctx, nil, operations.WithRetries(
		retry.Config{
			Strategy: "backoff",
			Backoff: &retry.BackoffStrategy{
				InitialInterval: 1,
				MaxInterval:     50,
				Exponent:        1.1,
				MaxElapsedTime:  100,
			},
			RetryConnectionErrors: false,
		}))
	if err != nil {
		log.Fatal(err)
	}
	if res.CreateAppResponse != nil {
		// handle response
	}
}

If you'd like to override the default retry strategy for all operations that support retries, you can use the WithRetryConfig option at SDK initialization:

package main

import (
	"context"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
	"github.com/conductorone/conductorone-sdk-go/pkg/retry"
	"log"
)

func main() {
	s := conductoronesdkgo.New(
		conductoronesdkgo.WithRetryConfig(
			retry.Config{
				Strategy: "backoff",
				Backoff: &retry.BackoffStrategy{
					InitialInterval: 1,
					MaxInterval:     50,
					Exponent:        1.1,
					MaxElapsedTime:  100,
				},
				RetryConnectionErrors: false,
			}),
		conductoronesdkgo.WithSecurity(shared.Security{
			BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
			Oauth:      "<YOUR_OAUTH_HERE>",
		}),
	)

	ctx := context.Background()
	res, err := s.Apps.Create(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	if res.CreateAppResponse != nil {
		// handle response
	}
}

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release !

SDK Created by Speakeasy

Documentation

Index

Constants

View Source
const ClientIdGolangSDK = "2RCzHlak5q7CY14SdBc8HoZEJRf"

Variables

View Source
var (
	ErrInvalidClientSecret = errors.New("invalid client secret")
	ErrInvalidClientID     = errors.New("invalid client id")
)
View Source
var ServerList = []string{

	"https://{tenantDomain}.conductor.one",
}

ServerList contains the list of servers available to the SDK

Functions

func Bool

func Bool(b bool) *bool

Bool provides a helper function to return a pointer to a bool

func Float32

func Float32(f float32) *float32

Float32 provides a helper function to return a pointer to a float32

func Float64

func Float64(f float64) *float64

Float64 provides a helper function to return a pointer to a float64

func Int

func Int(i int) *int

Int provides a helper function to return a pointer to an int

func Int64

func Int64(i int64) *int64

Int64 provides a helper function to return a pointer to an int64

func NewTokenSource added in v1.6.1

func NewTokenSource(ctx context.Context, clientID string, clientSecret string, tokenHost string) (oauth2.TokenSource, error)

func Pointer added in v1.20.0

func Pointer[T any](v T) *T

Pointer provides a helper function to return a pointer to a type

func String

func String(s string) *string

String provides a helper function to return a pointer to a string

Types

type AWSExternalIDSettings added in v1.16.0

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

func (*AWSExternalIDSettings) Get added in v1.16.0

Get Invokes the c1.api.settings.v1.AWSExternalIDSettings.Get method.

type AppAccessRequestsDefaults added in v1.18.3

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

func (*AppAccessRequestsDefaults) CancelAppAccessRequestsDefaults added in v1.18.3

CancelAppAccessRequestsDefaults - Cancel App Access Requests Defaults Invokes the c1.api.app.v1.AppAccessRequestsDefaultsService.CancelAppAccessRequestsDefaults method.

func (*AppAccessRequestsDefaults) CreateAppAccessRequestsDefaults added in v1.18.3

CreateAppAccessRequestsDefaults - Create App Access Requests Defaults Invokes the c1.api.app.v1.AppAccessRequestsDefaultsService.CreateAppAccessRequestsDefaults method.

func (*AppAccessRequestsDefaults) GetAppAccessRequestsDefaults added in v1.18.3

GetAppAccessRequestsDefaults - Get App Access Requests Defaults Invokes the c1.api.app.v1.AppAccessRequestsDefaultsService.GetAppAccessRequestsDefaults method.

type AppEntitlementOwners added in v1.15.0

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

func (*AppEntitlementOwners) Add added in v1.15.0

Add Add an owner to a given app entitlement.

func (*AppEntitlementOwners) List added in v1.15.0

List List owners for a given app entitlement.

func (*AppEntitlementOwners) Remove added in v1.15.0

Remove Remove an owner from a given app entitlement.

func (*AppEntitlementOwners) Set added in v1.15.0

Set Sets the owners for a given app entitlement to the specified list of users.

type AppEntitlementSearch added in v1.15.0

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

func (*AppEntitlementSearch) Search added in v1.15.0

Search Search app entitlements based on filters specified in the request body.

func (*AppEntitlementSearch) SearchAppEntitlementsForAppUser added in v1.20.0

SearchAppEntitlementsForAppUser - Search App Entitlements For App User Invokes the c1.api.app.v1.AppEntitlementSearchService.SearchAppEntitlementsForAppUser method.

func (*AppEntitlementSearch) SearchAppEntitlementsWithExpired added in v1.18.3

SearchAppEntitlementsWithExpired - Search App Entitlements With Expired Search app entitlements, include app users, users, expires, discovered.

type AppEntitlementUserBinding added in v1.15.0

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

func (*AppEntitlementUserBinding) ListAppUsersForIdentityWithGrant added in v1.15.0

ListAppUsersForIdentityWithGrant - List App Users For Identity With Grant Returns a list of app users for the identity in the app. If that app user also has a grant to the entitlement from the request, data about the grant is also returned. It will always return ALL app users for this identity, but only SOME may have grant data.

func (*AppEntitlementUserBinding) SearchGrantFeed added in v1.20.0

SearchGrantFeed - Search Grant Feed Invokes the c1.api.app.v1.AppEntitlementUserBindingService.SearchGrantFeed method.

func (*AppEntitlementUserBinding) SearchPastGrants added in v1.19.0

SearchPastGrants - Search Past Grants Invokes the c1.api.app.v1.AppEntitlementUserBindingService.SearchPastGrants method.

type AppEntitlements added in v1.15.0

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

func (*AppEntitlements) Create added in v1.20.0

Create Invokes the c1.api.app.v1.AppEntitlements.Create method.

func (*AppEntitlements) Delete added in v1.20.0

Delete Invokes the c1.api.app.v1.AppEntitlements.Delete method.

func (*AppEntitlements) Get added in v1.15.0

Get Get an app entitlement by ID.

func (*AppEntitlements) List added in v1.15.0

List List app entitlements associated with an app.

func (*AppEntitlements) ListForAppResource added in v1.15.0

ListForAppResource - List For App Resource List app entitlements associated with an app resource.

func (*AppEntitlements) ListForAppUser added in v1.15.0

ListForAppUser - List For App User List app entitlements associated with an app user.

func (*AppEntitlements) ListUsers added in v1.15.0

ListUsers - List Users List the users, as AppEntitlementUsers objects, of an app entitlement.

Deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.

func (*AppEntitlements) Update added in v1.15.0

Update Update an app entitlement by ID.

type AppEntitlementsProxy added in v1.21.3

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

func (*AppEntitlementsProxy) Create added in v1.21.3

Create Invokes the c1.api.app.v1.AppEntitlementsProxy.Create method.

func (*AppEntitlementsProxy) Delete added in v1.21.3

Delete Invokes the c1.api.app.v1.AppEntitlementsProxy.Delete method.

func (*AppEntitlementsProxy) Get added in v1.21.3

Get Invokes the c1.api.app.v1.AppEntitlementsProxy.Get method.

type AppOwners added in v1.15.0

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

func (*AppOwners) Add added in v1.15.0

Add Adds an owner to an app.

func (*AppOwners) List added in v1.15.0

List List owners of an app.

func (*AppOwners) Remove added in v1.15.0

Remove Removes an owner from an app.

func (*AppOwners) Set added in v1.15.0

Set Sets the owners for a given app to the specified list of users.

type AppReport added in v1.15.0

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

func (*AppReport) List added in v1.15.0

List Get a list of reports for the given app.

type AppReportAction added in v1.15.0

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

func (*AppReportAction) GenerateReport added in v1.15.0

GenerateReport - Generate Report Generate a report for the given app.

type AppResource added in v1.15.0

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

func (*AppResource) CreateManuallyManagedAppResource added in v1.20.0

CreateManuallyManagedAppResource - Create Manually Managed App Resource Invokes the c1.api.app.v1.AppResourceService.CreateManuallyManagedAppResource method.

func (*AppResource) DeleteManuallyManagedAppResource added in v1.20.0

DeleteManuallyManagedAppResource - Delete Manually Managed App Resource Invokes the c1.api.app.v1.AppResourceService.DeleteManuallyManagedAppResource method.

func (*AppResource) Get added in v1.15.0

Get Invokes the c1.api.app.v1.AppResourceService.Get method.

func (*AppResource) List added in v1.15.0

List Invokes the c1.api.app.v1.AppResourceService.List method.

func (*AppResource) Update added in v1.20.0

Update Invokes the c1.api.app.v1.AppResourceService.Update method.

type AppResourceOwners added in v1.15.0

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

func (*AppResourceOwners) List added in v1.15.0

List List all owners of an app resource.

type AppResourceSearch added in v1.15.0

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

func (*AppResourceSearch) SearchAppResourceTypes added in v1.15.0

SearchAppResourceTypes - Search App Resource Types Search app resources based on filters specified in the request body.

type AppResourceType added in v1.15.0

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

func (*AppResourceType) CreateManuallyManagedResourceType added in v1.20.0

CreateManuallyManagedResourceType - Create Manually Managed Resource Type Invokes the c1.api.app.v1.AppResourceTypeService.CreateManuallyManagedResourceType method.

func (*AppResourceType) DeleteManuallyManagedResourceType added in v1.20.0

DeleteManuallyManagedResourceType - Delete Manually Managed Resource Type Invokes the c1.api.app.v1.AppResourceTypeService.DeleteManuallyManagedResourceType method.

func (*AppResourceType) Get added in v1.15.0

Get Get an app resource type.

func (*AppResourceType) List added in v1.15.0

List List app resource types.

func (*AppResourceType) UpdateManuallyManagedResourceType added in v1.20.0

UpdateManuallyManagedResourceType - Update Manually Managed Resource Type Invokes the c1.api.app.v1.AppResourceTypeService.UpdateManuallyManagedResourceType method.

type AppSearch added in v1.15.0

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

func (*AppSearch) Search added in v1.15.0

Search Search apps based on filters specified in the request body.

type AppUsageControls added in v1.15.0

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

func (*AppUsageControls) Get added in v1.15.0

Get Get usage controls, as an AppUsageControls object which describes some peripheral configuration, for an app.

func (*AppUsageControls) Update added in v1.15.0

Update Update usage controls for an app.

type AppUser added in v1.15.0

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

func (*AppUser) Update added in v1.15.0

Update Update an app user by ID. Only the fields specified in the update mask are updated.

Currently, only the appUserType, and identityUserId fields can be updated.

type Apps added in v1.15.0

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

func (*Apps) Create added in v1.15.0

Create Create a new app.

func (*Apps) Delete added in v1.15.0

Delete Delete an app.

func (*Apps) Get added in v1.15.0

Get Get an app by ID.

func (*Apps) List added in v1.15.0

List List all apps.

func (*Apps) Update added in v1.15.0

Update Update an existing app.

type AttributeSearch added in v1.15.0

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

func (*AttributeSearch) SearchAttributeValues added in v1.15.0

SearchAttributeValues - Search Attribute Values Search attributes based on filters specified in the request body.

type Attributes added in v1.15.0

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

func (*Attributes) CreateAttributeValue added in v1.15.0

CreateAttributeValue - Create Attribute Value Create a new attribute value.

func (*Attributes) DeleteAttributeValue added in v1.15.0

DeleteAttributeValue - Delete Attribute Value Delete an attribute value by id.

func (*Attributes) GetAttributeValue added in v1.15.0

GetAttributeValue - Get Attribute Value Get an attribute value by id.

func (*Attributes) ListAttributeTypes added in v1.15.0

ListAttributeTypes - List Attribute Types List all attribute types.

func (*Attributes) ListAttributeValues added in v1.15.0

ListAttributeValues - List Attribute Values List all attribute values for a given attribute type.

type Auth added in v1.15.0

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

func (*Auth) Introspect added in v1.15.0

Introspect Introspect returns the current user's principle_id, user_id and a list of roles, permissions, and enabled features.

type ClientConfig added in v1.15.0

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

func NormalizeTenant added in v1.15.0

func NormalizeTenant(input string) (*ClientConfig, error)

func ParseClientID added in v1.15.0

func ParseClientID(input string) (*ClientConfig, error)

func (*ClientConfig) GetServerURL added in v1.15.0

func (c *ClientConfig) GetServerURL() string

GetServerURL returns the server URL. If serverURL is empty (""), it constructs the server URL using the tenant. However, if the tenant is also empty, then it will return an empty string.

func (*ClientConfig) ServerURL added in v1.15.0

func (c *ClientConfig) ServerURL() string

ServerURL returns the server URL.

func (*ClientConfig) SetServerURL added in v1.15.0

func (c *ClientConfig) SetServerURL(serverURL string) error

func (*ClientConfig) SetTenant added in v1.15.0

func (c *ClientConfig) SetTenant(tenant string) error

func (*ClientConfig) Tenant added in v1.15.0

func (c *ClientConfig) Tenant() string

func (*ClientConfig) UseWithServer added in v1.15.0

func (c *ClientConfig) UseWithServer() bool

func (*ClientConfig) UseWithTenant added in v1.15.0

func (c *ClientConfig) UseWithTenant() bool

type ClientCredentials added in v1.1.1

type ClientCredentials struct {
	ClientID     string
	ClientSecret string
}

func LoginFlow added in v1.1.1

func LoginFlow(
	ctx context.Context,
	tenantName string,
	clientID string,
	personalClientCredentialDisplayName string,
	cb func(validateDetails *DeviceCodeResponse) error,
) (*ClientCredentials, error)

type ConductoroneAPI

type ConductoroneAPI struct {
	Apps                      *Apps
	AppAccessRequestsDefaults *AppAccessRequestsDefaults
	Connector                 *Connector
	AppEntitlements           *AppEntitlements
	AppEntitlementSearch      *AppEntitlementSearch
	AppEntitlementUserBinding *AppEntitlementUserBinding
	AppEntitlementOwners      *AppEntitlementOwners
	AppOwners                 *AppOwners
	AppReport                 *AppReport
	AppReportAction           *AppReportAction
	AppResourceType           *AppResourceType
	AppResource               *AppResource
	AppResourceOwners         *AppResourceOwners
	AppUsageControls          *AppUsageControls
	AppUser                   *AppUser
	AppEntitlementsProxy      *AppEntitlementsProxy
	Attributes                *Attributes
	Auth                      *Auth
	RequestCatalogManagement  *RequestCatalogManagement
	Directory                 *Directory
	PersonalClient            *PersonalClient
	Roles                     *Roles
	Policies                  *Policies
	PolicyValidate            *PolicyValidate
	AppResourceSearch         *AppResourceSearch
	AppSearch                 *AppSearch
	AttributeSearch           *AttributeSearch
	PersonalClientSearch      *PersonalClientSearch
	PolicySearch              *PolicySearch
	RequestCatalogSearch      *RequestCatalogSearch
	ExportsSearch             *ExportsSearch
	TaskSearch                *TaskSearch
	UserSearch                *UserSearch
	WebhooksSearch            *WebhooksSearch
	AWSExternalIDSettings     *AWSExternalIDSettings
	SessionSettings           *SessionSettings
	SystemLog                 *SystemLog
	Export                    *Export
	Task                      *Task
	TaskActions               *TaskActions
	User                      *User
	Webhooks                  *Webhooks
	// contains filtered or unexported fields
}

ConductoroneAPI - ConductorOne API: The ConductorOne API is a HTTP API for managing ConductorOne resources.

func New

func New(opts ...SDKOption) *ConductoroneAPI

New creates a new instance of the SDK with the provided options

func NewWithCredentials added in v1.6.1

func NewWithCredentials(ctx context.Context, cred *ClientCredentials, opts ...CustomSDKOption) (*ConductoroneAPI, error)

type Connector added in v1.15.0

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

func (*Connector) Create added in v1.15.0

Create Create a configured connector.

func (*Connector) CreateDelegated added in v1.15.0

CreateDelegated - Create Delegated Create a connector that is pending a connector config.

func (*Connector) Delete added in v1.15.0

Delete Delete a connector.

func (*Connector) ForceSync added in v1.18.3

ForceSync - Force Sync Invokes the c1.api.app.v1.ConnectorService.ForceSync method.

func (*Connector) Get added in v1.15.0

Get Get a connector.

func (*Connector) GetCredentials added in v1.15.0

GetCredentials - Get Credentials Get credentials for a connector.

func (*Connector) List added in v1.15.0

List List connectors for an app.

func (*Connector) RevokeCredential added in v1.15.0

RevokeCredential - Revoke Credential Revoke credentials for a connector.

func (*Connector) RotateCredential added in v1.15.0

RotateCredential - Rotate Credential Rotate credentials for a connector.

func (*Connector) Update added in v1.15.0

Update Update a connector.

func (*Connector) UpdateDelegated added in v1.15.0

UpdateDelegated - Update Delegated Update a delegated connector.

type CustomOptions added in v1.6.1

type CustomOptions struct {
	*ClientConfig
	// contains filtered or unexported fields
}

type CustomSDKOption added in v1.6.1

type CustomSDKOption func(*CustomOptions)

func WithLog added in v1.6.1

func WithLog(logger *zap.Logger) CustomSDKOption

func WithTLSConfig added in v1.6.1

func WithTLSConfig(tlsConfig *tls.Config) CustomSDKOption

func WithTenantCustom added in v1.6.1

func WithTenantCustom(input string) (CustomSDKOption, error)

func WithUserAgent added in v1.6.1

func WithUserAgent(userAgent string) CustomSDKOption

type DeviceCodeResponse added in v1.1.1

type DeviceCodeResponse struct {
	DeviceCode      string `json:"device_code"`
	UserCode        string `json:"user_code"`
	VerificationURI string `json:"verification_uri_complete"`
	ExpiresIn       int64  `json:"expires_in"`
	Interval        int64  `json:"interval"`
}

type Directory added in v1.15.0

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

func (*Directory) Create added in v1.15.0

Create Create a directory.

func (*Directory) Delete added in v1.15.0

Delete Delete a directory by app_id.

func (*Directory) Get added in v1.15.0

Get Get a directory by app_id.

func (*Directory) List added in v1.15.0

List List directories.

type Export added in v1.19.0

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

func (*Export) Create added in v1.19.0

Create Create a system log export.

func (*Export) Delete added in v1.19.0

Delete Delete a policy by ID.

func (*Export) Get added in v1.19.0

Get Get a system log export by ID

func (*Export) List added in v1.19.0

List List Exports.

func (*Export) ListEvents added in v1.20.0

ListEvents - List Events Invokes the c1.api.systemlog.v1.ExportService.ListEvents method.

func (*Export) Update added in v1.19.0

Update Update a system log export by providing a policy object and an update mask.

type ExportsSearch added in v1.19.0

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

func (*ExportsSearch) Search added in v1.19.0

Search Invokes the c1.api.systemlog.v1.ExportsSearchService.Search method.

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient provides an interface for suplying the SDK with a custom HTTP client

type PersonalClient added in v1.15.0

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

func (*PersonalClient) Create added in v1.15.0

Create Create creates a new PersonalClient object for the current User.

func (*PersonalClient) Delete added in v1.20.0

Delete Invokes the c1.api.iam.v1.PersonalClientService.Delete method.

func (*PersonalClient) Get added in v1.20.0

Get Invokes the c1.api.iam.v1.PersonalClientService.Get method.

func (*PersonalClient) List added in v1.20.0

List - NOTE: Only shows personal clients for the current user. Invokes the c1.api.iam.v1.PersonalClientService.List method.

func (*PersonalClient) Update added in v1.20.0

Update Invokes the c1.api.iam.v1.PersonalClientService.Update method.

type PersonalClientSearch added in v1.20.0

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

func (*PersonalClientSearch) Search added in v1.20.0

Search - NOTE: Searches personal clients for all users Invokes the c1.api.iam.v1.PersonalClientSearchService.Search method.

type Policies added in v1.15.0

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

func (*Policies) Create added in v1.15.0

Create Create a policy.

func (*Policies) Delete added in v1.15.0

Delete Delete a policy by ID.

func (*Policies) Get added in v1.15.0

Get Get a policy by ID.

func (*Policies) List added in v1.15.0

List List policies.

func (*Policies) Update added in v1.15.0

Update Update a policy by providing a policy object and an update mask.

type PolicySearch added in v1.15.0

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

func (*PolicySearch) Search added in v1.15.0

Search Search policies based on filters specified in the request body.

type PolicyValidate added in v1.15.0

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

func (*PolicyValidate) ValidateCEL added in v1.15.0

ValidateCEL - Validate Cel Validate policies

type RequestCatalogManagement added in v1.15.0

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

func (*RequestCatalogManagement) AddAccessEntitlements added in v1.15.0

AddAccessEntitlements - Add Access Entitlements Add visibility bindings (access entitlements) to a catalog.

func (*RequestCatalogManagement) AddAppEntitlements added in v1.15.0

AddAppEntitlements - Add App Entitlements Add requestable entitlements to a catalog.

func (*RequestCatalogManagement) Create added in v1.15.0

Create Creates a new request catalog.

func (*RequestCatalogManagement) ForceRunBundleAutomation added in v1.20.0

ForceRunBundleAutomation - Force Run Bundle Automation Invokes the c1.api.requestcatalog.v1.RequestCatalogManagementService.ForceRunBundleAutomation method.

func (*RequestCatalogManagement) GetBundleAutomation added in v1.18.3

GetBundleAutomation - Get Bundle Automation Get bundle automation

func (*RequestCatalogManagement) List added in v1.15.0

List Get a list of request catalogs.

func (*RequestCatalogManagement) ListEntitlementsForAccess added in v1.15.0

ListEntitlementsForAccess - List Entitlements For Access List visibility bindings (access entitlements) for a catalog.

func (*RequestCatalogManagement) ListEntitlementsPerCatalog added in v1.15.0

ListEntitlementsPerCatalog - List Entitlements Per Catalog List entitlements in a catalog that are requestable.

func (*RequestCatalogManagement) RemoveAccessEntitlements added in v1.15.0

RemoveAccessEntitlements - Remove Access Entitlements Remove visibility bindings (access entitlements) to a catalog.

func (*RequestCatalogManagement) RemoveAppEntitlements added in v1.15.0

RemoveAppEntitlements - Remove App Entitlements Remove requestable entitlements from a catalog.

func (*RequestCatalogManagement) SetBundleAutomation added in v1.18.3

SetBundleAutomation - Set Bundle Automation Invokes the c1.api.requestcatalog.v1.RequestCatalogManagementService.SetBundleAutomation method.

type RequestCatalogSearch added in v1.15.0

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

func (*RequestCatalogSearch) SearchEntitlements added in v1.15.0

SearchEntitlements - Search Entitlements Search request catalogs based on filters specified in the request body.

type Roles added in v1.15.0

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

func (*Roles) Get added in v1.15.0

Get Get a role by id.

func (*Roles) List added in v1.15.0

List List all roles for the current user.

func (*Roles) Update added in v1.15.0

Update Update a role by passing a Role object.

type SDKOption

type SDKOption func(*ConductoroneAPI)

func WithClient

func WithClient(client HTTPClient) SDKOption

WithClient allows the overriding of the default HTTP client used by the SDK

func WithRetryConfig added in v1.8.0

func WithRetryConfig(retryConfig retry.Config) SDKOption

func WithSecurity added in v1.7.0

func WithSecurity(security shared.Security) SDKOption

WithSecurity configures the SDK to use the provided security details

func WithSecuritySource added in v1.11.2

func WithSecuritySource(security func(context.Context) (shared.Security, error)) SDKOption

WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication

func WithServerIndex

func WithServerIndex(serverIndex int) SDKOption

WithServerIndex allows the overriding of the default server by index

func WithServerURL

func WithServerURL(serverURL string) SDKOption

WithServerURL allows the overriding of the default server URL

func WithTemplatedServerURL

func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption

WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters

func WithTenant added in v1.1.1

func WithTenant(input string) (SDKOption, error)

func WithTenantDomain

func WithTenantDomain(tenantDomain string) SDKOption

WithTenantDomain allows setting the tenantDomain variable for url substitution

func WithTimeout added in v1.18.3

func WithTimeout(timeout time.Duration) SDKOption

WithTimeout Optional request timeout applied to each operation

type SessionSettings added in v1.16.0

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

func (*SessionSettings) Get added in v1.16.0

Get Invokes the c1.api.settings.v1.SessionSettingsService.Get method.

func (*SessionSettings) Update added in v1.16.0

Update Invokes the c1.api.settings.v1.SessionSettingsService.Update method.

type SystemLog added in v1.18.3

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

func (*SystemLog) ListEvents added in v1.18.3

ListEvents - List Events ListEvents pulls Events from the ConductorOne system.

This endpoint should be used to synchorize the
system log events to external systems.

type Task added in v1.15.0

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

func (*Task) CreateGrantTask added in v1.15.0

CreateGrantTask - Create Grant Task Create a grant task

func (*Task) CreateOffboardingTask added in v1.18.3

CreateOffboardingTask - Create Offboarding Task Invokes the c1.api.task.v1.TaskService.CreateOffboardingTask method.

func (*Task) CreateRevokeTask added in v1.15.0

CreateRevokeTask - Create Revoke Task Create a revoke task

func (*Task) Get added in v1.15.0

Get Get a task by ID

type TaskActions added in v1.15.0

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

func (*TaskActions) Approve added in v1.15.0

Approve Invokes the c1.api.task.v1.TaskActionsService.Approve method.

func (*TaskActions) Comment added in v1.15.0

Comment Invokes the c1.api.task.v1.TaskActionsService.Comment method.

func (*TaskActions) Deny added in v1.15.0

Deny Invokes the c1.api.task.v1.TaskActionsService.Deny method.

func (*TaskActions) EscalateToEmergencyAccess added in v1.15.0

EscalateToEmergencyAccess - Escalate To Emergency Access Invokes the c1.api.task.v1.TaskActionsService.EscalateToEmergencyAccess method.

func (*TaskActions) HardReset added in v1.20.0

HardReset - Hard Reset Invokes the c1.api.task.v1.TaskActionsService.HardReset method.

func (*TaskActions) Reassign added in v1.18.3

Reassign Invokes the c1.api.task.v1.TaskActionsService.Reassign method.

func (*TaskActions) Restart added in v1.15.0

Restart Invokes the c1.api.task.v1.TaskActionsService.Restart method.

type TaskSearch added in v1.15.0

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

func (*TaskSearch) Search added in v1.15.0

Search Search tasks based on filters specified in the request body.

type User added in v1.15.0

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

func (*User) Get added in v1.15.0

Get Get a user by ID.

func (*User) List added in v1.15.0

List List users.

type UserSearch added in v1.15.0

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

func (*UserSearch) Search added in v1.15.0

Search Search users based on filters specified in the request body.

type Webhooks added in v1.18.3

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

func (*Webhooks) Create added in v1.18.3

Create Invokes the c1.api.webhooks.v1.WebhooksService.Create method.

func (*Webhooks) Delete added in v1.18.3

Delete Invokes the c1.api.webhooks.v1.WebhooksService.Delete method.

func (*Webhooks) Get added in v1.18.3

Get Invokes the c1.api.webhooks.v1.WebhooksService.Get method.

func (*Webhooks) List added in v1.18.3

List Invokes the c1.api.webhooks.v1.WebhooksService.List method.

func (*Webhooks) Test added in v1.18.3

Test Invokes the c1.api.webhooks.v1.WebhooksService.Test method.

func (*Webhooks) Update added in v1.18.3

Update Invokes the c1.api.webhooks.v1.WebhooksService.Update method.

type WebhooksSearch added in v1.18.3

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

func (*WebhooksSearch) Search added in v1.18.3

Search Invokes the c1.api.webhooks.v1.WebhooksSearch.Search method.

Directories

Path Synopsis
internal
pkg

Jump to

Keyboard shortcuts

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