README ¶
conductorone-api
SDK Installation
go get github.com/ConductorOne/conductorone-sdk-go
SDK Example Usage
package main
import(
"context"
"log"
"github.com/conductorone/conductorone-sdk-go"
"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
"github.com/conductorone/conductorone-sdk-go/pkg/models/operations"
)
func main() {
s := conductoroneapi.New(
conductoroneapi.WithSecurity(shared.Security{
BearerAuth: "",
Oauth: "",
}),
)
ctx := context.Background()
res, err := s.AppEntitlementOwners.Add(ctx, operations.C1APIAppV1AppEntitlementOwnersAddRequest{
AddAppEntitlementOwnerRequest: &shared.AddAppEntitlementOwnerRequest{
UserID: conductoroneapi.String("corrupti"),
},
AppID: "provident",
EntitlementID: "distinctio",
})
if err != nil {
log.Fatal(err)
}
if res.AddAppEntitlementOwnerResponse != nil {
// handle response
}
}
Available Resources and Operations
AppEntitlementOwners
AppEntitlementSearch
- Search - Search
AppEntitlementUserBinding
- ListAppUsersForIdentityWithGrant - List App Users For Identity With Grant
AppEntitlements
- Get - Get
- List - List
- ListForAppResource - List For App Resource
- ListForAppUser - List For App User
- ListUsers - List Users
- Update - Update
AppOwners
AppReport
- List - List
AppReportAction
- GenerateReport - Generate Report
AppResource
AppResourceOwners
- List - List
AppResourceSearch
- SearchAppResourceTypes - Search App Resource Types
AppResourceType
AppSearch
- Search - Search
AppUsageControls
AppUser
- Update - Update
Apps
AttributeSearch
- SearchAttributeValues - Search Attribute Values
Attributes
- CreateAttributeValue - Create Attribute Value
- DeleteAttributeValue - Delete Attribute Value
- GetAttributeValue - Get Attribute Value
- ListAttributeTypes - List Attribute Types
- ListAttributeValues - List Attribute Values
Auth
- Introspect - Introspect
Connector
- Create - Create
- CreateDelegated - Create Delegated
- Delete - Delete
- Get - Get
- GetCredentials - Get Credentials
- List - List
- RevokeCredential - Revoke Credential
- RotateCredential - Rotate Credential
- Update - Update
- UpdateDelegated - Update Delegated
Directory
PersonalClient
- Create - Create
Policies
PolicySearch
- Search - Search
RequestCatalogManagement
- AddAccessEntitlements - Add Access Entitlements
- AddAppEntitlements - Add App Entitlements
- Create - Create
- Delete - Delete
- Get - Get
- ListEntitlementsForAccess - List Entitlements For Access
- ListEntitlementsPerCatalog - List Entitlements Per Catalog
- RemoveAccessEntitlements - Remove Access Entitlements
- RemoveAppEntitlements - Remove App Entitlements
- Update - Update
RequestCatalogSearch
- SearchEntitlements - Search Entitlements
Roles
Task
- CreateGrantTask - Create Grant Task
- CreateRevokeTask - Create Revoke Task
- Get - Get
TaskActions
- Approve - Approve
- Comment - Comment
- Deny - Deny
- EscalateToEmergencyAccess - Escalate To Emergency Access
TaskSearch
- Search - Search
User
UserSearch
- Search - Search
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
- Variables
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int64(i int64) *int64
- func NewTokenSource(ctx context.Context, clientID string, clientSecret string, hostOverride string) (oauth2.TokenSource, error)
- func String(s string) *string
- type ClientCredentials
- type ConductoroneAPI
- type CustomOptions
- type CustomSDKOption
- type DeviceCodeResponse
- type HTTPClient
- type SDKOption
- func WithClient(client HTTPClient) SDKOption
- func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption
- func WithSecurity(security shared.Security) SDKOption
- func WithServerIndex(serverIndex int) SDKOption
- func WithServerURL(serverURL string) SDKOption
- func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption
- func WithTenant(input string) (SDKOption, error)
- func WithTenantDomain(tenantDomain string) SDKOption
Constants ¶
const ClientIdGolangSDK = "2RCzHlak5q7CY14SdBc8HoZEJRf"
Variables ¶
var ( ErrInvalidClientSecret = errors.New("invalid client secret") ErrInvalidClientID = errors.New("invalid client id") )
var ServerList = []string{
"https://{tenantDomain}.conductor.one",
}
ServerList contains the list of servers available to the SDK
Functions ¶
func NewTokenSource ¶ added in v1.6.1
Types ¶
type ClientCredentials ¶ added in v1.1.1
type ConductoroneAPI ¶
type ConductoroneAPI struct { AppEntitlementOwners *appEntitlementOwners AppEntitlementSearch *appEntitlementSearch AppEntitlementUserBinding *appEntitlementUserBinding AppEntitlements *appEntitlements AppOwners *appOwners AppReport *appReport AppReportAction *appReportAction AppResource *appResource AppResourceOwners *appResourceOwners AppResourceSearch *appResourceSearch AppResourceType *appResourceType AppSearch *appSearch AppUsageControls *appUsageControls AppUser *appUser Apps *apps AttributeSearch *attributeSearch Attributes *attributes Auth *auth Connector *connector Directory *directory PersonalClient *personalClient Policies *policies PolicySearch *policySearch RequestCatalogManagement *requestCatalogManagement RequestCatalogSearch *requestCatalogSearch Roles *roles Task *task TaskActions *taskActions TaskSearch *taskSearch User *user UserSearch *userSearch // 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 CustomOptions ¶ added in v1.6.1
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 HTTPClient ¶
HTTPClient provides an interface for suplying the SDK with a custom HTTP client
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 utils.RetryConfig) SDKOption
func WithSecurity ¶ added in v1.7.0
WithSecurity configures the SDK to use the provided security details
func WithServerIndex ¶
WithServerIndex allows the overriding of the default server by index
func WithServerURL ¶
WithServerURL allows the overriding of the default server URL
func WithTemplatedServerURL ¶
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 WithTenantDomain ¶
WithTenantDomain allows setting the tenantDomain variable for url substitution
Source Files ¶
- appentitlementowners.go
- appentitlements.go
- appentitlementsearch.go
- appentitlementuserbinding.go
- appowners.go
- appreport.go
- appreportaction.go
- appresource.go
- appresourceowners.go
- appresourcesearch.go
- appresourcetype.go
- apps.go
- appsearch.go
- appusagecontrols.go
- appuser.go
- attributes.go
- attributesearch.go
- auth.go
- conductoroneapi.go
- connector.go
- directory.go
- extra_sdk_options.go
- login.go
- personalclient.go
- policies.go
- policysearch.go
- requestcatalogmanagement.go
- requestcatalogsearch.go
- roles.go
- task.go
- taskactions.go
- tasksearch.go
- token_source.go
- user.go
- usersearch.go