conductoroneapi

package module
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 13 Imported by: 2

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/operations"
)

func main() {
    s := conductoroneapi.New()

    ctx := context.Background()
    res, err := s.AppEntitlementUserBinding.ListAppUsersForIdentityWithGrant(ctx, operations.C1APIAppV1AppEntitlementUserBindingServiceListAppUsersForIdentityWithGrantRequest{
        AppEntitlementID: "corrupti",
        AppID: "provident",
        IdentityUserID: "distinctio",
    })
    if err != nil {
        log.Fatal(err)
    }

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

Available Resources and Operations

AppEntitlementUserBinding
AppEntitlements
  • Get - Invokes the c1.api.app.v1.AppEntitlements.Get method.
AppOwners
  • Add - Invokes the c1.api.app.v1.AppOwners.Add method.
  • List - Invokes the c1.api.app.v1.AppOwners.List method.
  • Remove - Invokes the c1.api.app.v1.AppOwners.Remove method.
AppReport
  • List - Invokes the c1.api.app.v1.AppReportService.List method.
AppReportAction
  • GenerateReport - Invokes the c1.api.app.v1.AppReportActionService.GenerateReport method.
AppResource
  • Get - Invokes the c1.api.app.v1.AppResourceService.Get method.
  • List - Invokes the c1.api.app.v1.AppResourceService.List method.
AppResourceOwners
  • List - Invokes the c1.api.app.v1.AppResourceOwners.List method.
AppResourceSearch
AppResourceType
  • Get - Invokes the c1.api.app.v1.AppResourceTypeService.Get method.
  • List - Invokes the c1.api.app.v1.AppResourceTypeService.List method.
AppSearch
  • Search - Invokes the c1.api.app.v1.AppSearch.Search method.
AppUsageControls
  • Get - Invokes the c1.api.app.v1.AppUsageControlsService.Get method.
  • Update - Invokes the c1.api.app.v1.AppUsageControlsService.Update method.
Apps
  • Get - Invokes the c1.api.app.v1.Apps.Get method.
  • List - Invokes the c1.api.app.v1.Apps.List method.
Auth
  • Introspect - Invokes the c1.api.auth.v1.Auth.Introspect method.
Directory
  • Create - Invokes the c1.api.directory.v1.DirectoryService.Create method.
  • Delete - Invokes the c1.api.directory.v1.DirectoryService.Delete method.
  • Get - Invokes the c1.api.directory.v1.DirectoryService.Get method.
  • List - Invokes the c1.api.directory.v1.DirectoryService.List method.
PersonalClient
  • Create - Invokes the c1.api.iam.v1.PersonalClientService.Create method.
Policies
  • Create - Invokes the c1.api.policy.v1.Policies.Create method.
  • Delete - Invokes the c1.api.policy.v1.Policies.Delete method.
  • Get - Invokes the c1.api.policy.v1.Policies.Get method.
  • List - Invokes the c1.api.policy.v1.Policies.List method.
  • Update - Invokes the c1.api.policy.v1.Policies.Update method.
RequestCatalogSearch
  • SearchEntitlements - Invokes the c1.api.requestcatalog.v1.RequestCatalogSearchService.SearchEntitlements method.
Roles
  • Get - Invokes the c1.api.iam.v1.Roles.Get method.
  • List - Invokes the c1.api.iam.v1.Roles.List method.
  • Update - Invokes the c1.api.iam.v1.Roles.Update method.
Task
  • CreateGrantTask - Invokes the c1.api.task.v1.TaskService.CreateGrantTask method.
  • CreateRevokeTask - Invokes the c1.api.task.v1.TaskService.CreateRevokeTask method.
  • Get - Invokes the c1.api.task.v1.TaskService.Get method.
TaskActions
  • Approve - Invokes the c1.api.task.v1.TaskActionsService.Approve method.
  • Comment - Invokes the c1.api.task.v1.TaskActionsService.Comment method.
  • Deny - Invokes the c1.api.task.v1.TaskActionsService.Deny method.
TaskSearch
  • Search - Invokes the c1.api.task.v1.TaskSearchService.Search method.
User
  • Get - Invokes the c1.api.user.v1.UserService.Get method.
  • List - Invokes the c1.api.user.v1.UserService.List method.
UserSearch
  • Search - Invokes the c1.api.user.v1.UserSearch.Search method.
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 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 String

func String(s string) *string

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

Types

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(validateUrl string) error) (*ClientCredentials, error)

type ConductoroneAPI

type ConductoroneAPI struct {
	AppEntitlementUserBinding *appEntitlementUserBinding
	AppEntitlements           *appEntitlements
	AppOwners                 *appOwners
	AppReport                 *appReport
	AppReportAction           *appReportAction
	AppResource               *appResource
	AppResourceOwners         *appResourceOwners
	AppResourceSearch         *appResourceSearch
	AppResourceType           *appResourceType
	AppSearch                 *appSearch
	AppUsageControls          *appUsageControls
	Apps                      *apps
	Auth                      *auth
	Directory                 *directory
	PersonalClient            *personalClient
	Policies                  *policies
	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

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 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 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 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 $name variable for url substitution

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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