service

package
v0.0.0-...-ee605f6 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MillsBetweenRetries  int     = 1000
	RetrySleepJitter     int     = 250
	MaxRequestsPerSecond float64 = 5
)

Variables

This section is empty.

Functions

func ConnectorTypeFromDeployment

func ConnectorTypeFromDeployment(ct sdk.DeploymentType) string

func ConnectorTypeFromString

func ConnectorTypeFromString(ct string) sdk.DeploymentType

func NewRateLimitTransport

func NewRateLimitTransport(requestsPerSecond float64, burst int, roundTripper http.RoundTripper) http.RoundTripper

Types

type AWSRequestBody

type AWSRequestBody struct {
	Provider             string   `json:"provider"`
	HostnameTagName      string   `json:"hostname_tag_name"`
	Name                 string   `json:"name"`
	AwsExternalID        string   `json:"aws_external_id"`
	ID                   string   `json:"id"`
	LuminateAwsAccountID string   `json:"luminate_aws_account_id"`
	Regions              []string `json:"regions"`
	AwsRoleArn           string   `json:"aws_role_arn"`
}

type AccessPolicyAPI

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

func NewAccessPolicyAPI

func NewAccessPolicyAPI(client *sdk.APIClient) *AccessPolicyAPI

func (*AccessPolicyAPI) CreateAccessPolicy

func (api *AccessPolicyAPI) CreateAccessPolicy(accessPolicy *dto.AccessPolicy) (*dto.AccessPolicy, error)

func (*AccessPolicyAPI) DeleteAccessPolicy

func (api *AccessPolicyAPI) DeleteAccessPolicy(policyId string) error

func (*AccessPolicyAPI) GetAccessPolicy

func (api *AccessPolicyAPI) GetAccessPolicy(policyId string) (*dto.AccessPolicy, error)

func (*AccessPolicyAPI) UpdateAccessPolicy

func (api *AccessPolicyAPI) UpdateAccessPolicy(accessPolicy *dto.AccessPolicy) (*dto.AccessPolicy, error)

type ApplicationAPI

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

func NewApplicationAPI

func NewApplicationAPI(client *sdk.APIClient) *ApplicationAPI

func (*ApplicationAPI) BindApplicationToSite

func (api *ApplicationAPI) BindApplicationToSite(application *dto.Application, siteID string) error

func (*ApplicationAPI) CreateApplication

func (api *ApplicationAPI) CreateApplication(application *dto.Application) (*dto.Application, error)

func (*ApplicationAPI) DeleteApplication

func (api *ApplicationAPI) DeleteApplication(applicationID string) error

func (*ApplicationAPI) GetApplicationById

func (api *ApplicationAPI) GetApplicationById(applicationID string) (*dto.Application, error)

func (*ApplicationAPI) UpdateApplication

func (api *ApplicationAPI) UpdateApplication(application *dto.Application) (*dto.Application, error)

type CollectionAPI

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

func NewCollectionAPI

func NewCollectionAPI(client *sdk.APIClient) *CollectionAPI

func (*CollectionAPI) CreateCollection

func (c *CollectionAPI) CreateCollection(name string) (*dto.Collection, error)

CreateCollection create collection

func (*CollectionAPI) DeleteCollection

func (c *CollectionAPI) DeleteCollection(collectionID string) error

DeleteCollection delete collection

func (*CollectionAPI) GetCollection

func (c *CollectionAPI) GetCollection(collectionID string) (*dto.Collection, error)

GetCollection get collection by id

func (c *CollectionAPI) GetCollectionSiteLinks(collectionID string) (*[]dto.CollectionSiteLink, error)

GetCollectionSiteLinks get collection site links

func (*CollectionAPI) GetCollectionsBySite

func (c *CollectionAPI) GetCollectionsBySite(siteID string) (*[]string, error)

GetCollectionsBySite get collections by site

func (*CollectionAPI) LinkSiteToCollection

func (c *CollectionAPI) LinkSiteToCollection(links []dto.CollectionSiteLink) (*[]dto.CollectionSiteLink, error)

LinkSiteToCollection link sites to collections

func (*CollectionAPI) UnlinkSiteFromCollection

func (c *CollectionAPI) UnlinkSiteFromCollection(link dto.CollectionSiteLink) error

UnlinkSiteFromCollection unlink site from collection

func (*CollectionAPI) UpdateCollection

func (c *CollectionAPI) UpdateCollection(name string, collectionID string) (*dto.Collection, error)

UpdateCollection update collection

type ConnectorsAPI

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

func NewConnectorsAPI

func NewConnectorsAPI(client *sdk.APIClient) *ConnectorsAPI

func (*ConnectorsAPI) CreateConnector

func (api *ConnectorsAPI) CreateConnector(connector *dto.Connector, siteID string) (*dto.Connector, error)

func (*ConnectorsAPI) DeleteConnector

func (api *ConnectorsAPI) DeleteConnector(connectorID string) error

func (*ConnectorsAPI) GetConnectorByID

func (api *ConnectorsAPI) GetConnectorByID(connectorID string) (*dto.Connector, error)

func (*ConnectorsAPI) GetConnectorCommand

func (api *ConnectorsAPI) GetConnectorCommand(connectorID string) (string, error)

type GroupAPI

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

func NewGroupAPI

func NewGroupAPI(client *sdk.APIClient) *GroupAPI

func (*GroupAPI) AssignUser

func (g *GroupAPI) AssignUser(groupId string, userId string) error

func (*GroupAPI) CheckAssignedUser

func (g *GroupAPI) CheckAssignedUser(groupId string, userId string) (bool, error)

func (*GroupAPI) GetGroupId

func (g *GroupAPI) GetGroupId(identityProviderId string, groupName string) (string, error)

func (*GroupAPI) RemoveUser

func (g *GroupAPI) RemoveUser(groupId string, userId string) error

type IdentityProviderAPI

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

func NewIdentityProviderAPI

func NewIdentityProviderAPI(client *sdk.APIClient) *IdentityProviderAPI

func (*IdentityProviderAPI) GetGroupDisplayNameTypeById

func (u *IdentityProviderAPI) GetGroupDisplayNameTypeById(identityProviderId string, IdentifierInProvider string) (string, error)

func (*IdentityProviderAPI) GetIdentityProviderId

func (u *IdentityProviderAPI) GetIdentityProviderId(identityProviderName string) (string, error)

func (*IdentityProviderAPI) GetIdentityProviderTypeById

func (u *IdentityProviderAPI) GetIdentityProviderTypeById(identityProviderId string) (sdk.IdentityProviderType, error)

func (*IdentityProviderAPI) GetUserDisplayNameTypeById

func (u *IdentityProviderAPI) GetUserDisplayNameTypeById(identityProviderId string, IdentifierInProvider string) (string, error)

type IntegrationAPI

type IntegrationAPI struct {
	BasePath string
	// contains filtered or unexported fields
}

func NewIntegrationAPI

func NewIntegrationAPI(client *sdk.APIClient, httpClient *http.Client, basePath string) *IntegrationAPI

func (*IntegrationAPI) CreateAWSIntegration

func (u *IntegrationAPI) CreateAWSIntegration(integrationName string) (*dto.AwsIntegration, error)

func (*IntegrationAPI) DeleteAWSIntegration

func (u *IntegrationAPI) DeleteAWSIntegration(integrationID string) error

func (*IntegrationAPI) GetIntegrationId

func (u *IntegrationAPI) GetIntegrationId(integrationName string) (string, error)

func (*IntegrationAPI) ReadAWSIntegration

func (u *IntegrationAPI) ReadAWSIntegration(integrationID string) (*dto.AwsIntegration, error)

func (*IntegrationAPI) ReadAWSIntegrationBind

func (u *IntegrationAPI) ReadAWSIntegrationBind(integrationID string) (*dto.AwsIntegrationBind, error)

func (*IntegrationAPI) UpdateAWSIntegration

func (u *IntegrationAPI) UpdateAWSIntegration(awsBody *AWSRequestBody) (*dto.AwsIntegrationBind, error)

type LuminateService

type LuminateService struct {
	TenantBaseDomain string

	Sites             *SiteAPI
	Connectors        *ConnectorsAPI
	Applications      *ApplicationAPI
	AccessPolicies    *AccessPolicyAPI
	Users             *UserAPI ``
	Groups            *GroupAPI
	IdentityProviders *IdentityProviderAPI
	IntegrationAPI    *IntegrationAPI
	SshClientApi      *SshClientAPI
	CollectionAPI     *CollectionAPI
	RoleBindingsAPI   *RoleBindingsAPI
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ClientID string, ClientSecret string, Endpoint string) *LuminateService

type RateLimitTransport

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

func (*RateLimitTransport) RoundTrip

func (t *RateLimitTransport) RoundTrip(r *http.Request) (*http.Response, error)

type RoleBindingsAPI

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

func NewRoleBindingsAPI

func NewRoleBindingsAPI(client *sdk.APIClient) *RoleBindingsAPI

func (*RoleBindingsAPI) CreateCollectionRoleBindings

func (r *RoleBindingsAPI) CreateCollectionRoleBindings(roleDTO *dto.CreateCollectionRoleDTO) ([]*dto.RoleBinding, error)

CreateCollectionRoleBindings assign tenant role to admin

func (*RoleBindingsAPI) CreateSiteRoleBindings

func (r *RoleBindingsAPI) CreateSiteRoleBindings(roleDTO *dto.CreateSiteRoleDTO) ([]*dto.RoleBinding, error)

CreateSiteRoleBindings assign site role to admin

func (*RoleBindingsAPI) CreateTenantRoleBindings

func (r *RoleBindingsAPI) CreateTenantRoleBindings(tenantRole *dto.CreateRoleDTO) ([]*dto.RoleBinding, error)

CreateTenantRoleBindings assign tenant role to admin

func (*RoleBindingsAPI) DeleteRoleBindings

func (r *RoleBindingsAPI) DeleteRoleBindings(roleID string) error

DeleteRoleBindings delete role bindings by id

func (*RoleBindingsAPI) ReadRoleBindings

func (r *RoleBindingsAPI) ReadRoleBindings(
	roleID string,
	roleType string,
	entityId string,
	collectionID string,
	siteID string,
) (*dto.RoleBinding, error)

ReadRoleBindings get role

type SiteAPI

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

func NewSiteAPI

func NewSiteAPI(client *sdk.APIClient) *SiteAPI

func (*SiteAPI) CreateSite

func (api *SiteAPI) CreateSite(site *dto.Site) (*dto.Site, error)

func (*SiteAPI) DeleteSite

func (api *SiteAPI) DeleteSite(siteID string) error

func (*SiteAPI) GetSiteByID

func (api *SiteAPI) GetSiteByID(SiteID string) (*dto.Site, error)

func (*SiteAPI) UpdateSite

func (api *SiteAPI) UpdateSite(site *dto.Site, siteID string) (*dto.Site, error)

type SshClientAPI

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

func NewSshClientAPI

func NewSshClientAPI(client *sdk.APIClient) *SshClientAPI

func (*SshClientAPI) GetSshClientByName

func (g *SshClientAPI) GetSshClientByName(sshClientName string) (*sdk.SshClient, error)

type UserAPI

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

func NewUserAPI

func NewUserAPI(client *sdk.APIClient) *UserAPI

func (*UserAPI) GetUserId

func (u *UserAPI) GetUserId(identityProviderId string, email string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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