client

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Overview

client.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Paragon ParagonConfig `json:"paragon"`
}

type AuthResponse

type AuthResponse struct {
	AccessToken string `json:"accessToken"`
}

type CLIKey

type CLIKey struct {
	ID           string `json:"id"`
	DateCreated  string `json:"dateCreated"`
	DateUpdated  string `json:"dateUpdated"`
	UserID       string `json:"userId"`
	Name         string `json:"name"`
	Suffix       string `json:"suffix"`
	DateLastUsed string `json:"dateLastUsed"`
}

type CLIKeyResponse

type CLIKeyResponse struct {
	Key string `json:"key"`
}

type Client

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

func NewClient

func NewClient(baseURL string) *Client

func (*Client) Authenticate

func (c *Client) Authenticate(ctx context.Context, username, password string) error

func (*Client) CreateCLIKey

func (c *Client) CreateCLIKey(ctx context.Context, keyName string) (*CLIKeyResponse, error)

func (*Client) CreateEnvironmentSecret

func (c *Client) CreateEnvironmentSecret(ctx context.Context, projectID, key, value string) (*EnvironmentSecret, error)

func (*Client) CreateIntegrationCredentials added in v1.2.0

func (c *Client) CreateIntegrationCredentials(ctx context.Context, projectID string, req CreateIntegrationCredentialsRequest) (*Credential, error)

func (*Client) CreateProject

func (c *Client) CreateProject(ctx context.Context, organizationID, projectName string) (*Project, error)

func (*Client) CreateSDKKey

func (c *Client) CreateSDKKey(ctx context.Context, projectID string) (*SDKKey, error)

func (*Client) DeleteCLIKey

func (c *Client) DeleteCLIKey(ctx context.Context, organizationID, keyID string) error

func (*Client) DeleteEnvironmentSecret

func (c *Client) DeleteEnvironmentSecret(ctx context.Context, projectID, secretID string) error

func (*Client) DeleteProject

func (c *Client) DeleteProject(ctx context.Context, projectID, teamID string) error

func (*Client) DeleteSDKKey

func (c *Client) DeleteSDKKey(ctx context.Context, projectID, keyID string) error

func (*Client) DeleteTeamInvite

func (c *Client) DeleteTeamInvite(ctx context.Context, teamID, inviteID string) error

func (*Client) DeleteTeamMember

func (c *Client) DeleteTeamMember(ctx context.Context, teamID, memberID string) error

func (*Client) GetCLIKeys

func (c *Client) GetCLIKeys(ctx context.Context, organizationID string) ([]CLIKey, error)

func (*Client) GetCredentials added in v1.2.0

func (c *Client) GetCredentials(ctx context.Context, projectID string) ([]Credential, error)

func (*Client) GetDecryptedCredential added in v1.2.0

func (c *Client) GetDecryptedCredential(ctx context.Context, projectID, credID string) (*DecryptedCredential, error)

func (*Client) GetEnvironmentSecrets

func (c *Client) GetEnvironmentSecrets(ctx context.Context, projectID string) ([]EnvironmentSecret, error)

func (*Client) GetIntegration added in v1.2.0

func (c *Client) GetIntegration(ctx context.Context, projectID, integrationID string) (*Integration, error)

func (*Client) GetIntegrations added in v1.2.0

func (c *Client) GetIntegrations(ctx context.Context, projectID string) ([]Integration, error)

func (*Client) GetOrganizations

func (c *Client) GetOrganizations(ctx context.Context) ([]Organization, error)

func (*Client) GetProjectByID

func (c *Client) GetProjectByID(ctx context.Context, projectID, teamID string) (*Project, error)

func (*Client) GetProjects added in v1.2.0

func (c *Client) GetProjects(ctx context.Context, teamID string) ([]Project, error)

func (*Client) GetSDKKeys

func (c *Client) GetSDKKeys(ctx context.Context, projectID string) ([]SDKKey, error)

func (*Client) GetTeamByID

func (c *Client) GetTeamByID(ctx context.Context, teamID string) (*Team, error)

func (*Client) GetTeamInvites

func (c *Client) GetTeamInvites(ctx context.Context, teamID string) ([]TeamInvite, error)

func (*Client) GetTeamMembers

func (c *Client) GetTeamMembers(ctx context.Context, teamID string) ([]TeamMember, error)

func (*Client) GetTeams

func (c *Client) GetTeams(ctx context.Context) ([]Team, error)

func (*Client) GetUserEmailFromToken added in v1.2.0

func (c *Client) GetUserEmailFromToken() (string, error)

func (*Client) GetUserIDFromToken

func (c *Client) GetUserIDFromToken() (string, error)

func (*Client) InviteTeamMember

func (c *Client) InviteTeamMember(ctx context.Context, teamID, role, email string) ([]TeamInvite, error)

func (*Client) UpdateCLIKey

func (c *Client) UpdateCLIKey(ctx context.Context, organizationID, keyID, newName string) (*CLIKey, error)

func (*Client) UpdateEnvironmentSecret

func (c *Client) UpdateEnvironmentSecret(ctx context.Context, projectID, secretID, key, value string) (*EnvironmentSecret, error)

func (*Client) UpdateIntegrationStatus added in v1.2.0

func (c *Client) UpdateIntegrationStatus(ctx context.Context, projectID, integrationID string, active bool) (*Integration, error)

func (*Client) UpdateProjectTitle

func (c *Client) UpdateProjectTitle(ctx context.Context, projectID, teamID, newTitle string) (*Project, error)

func (*Client) UpdateTeamMemberRole

func (c *Client) UpdateTeamMemberRole(ctx context.Context, teamID, memberID, role string) (*TeamMember, error)

type CreateEnvironmentSecretRequest

type CreateEnvironmentSecretRequest struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type CreateIntegrationCredentialsRequest added in v1.2.0

type CreateIntegrationCredentialsRequest struct {
	Name          string      `json:"name"`
	Values        OAuthValues `json:"values"`
	Provider      string      `json:"provider"`
	Scheme        string      `json:"scheme"`
	IntegrationID string      `json:"integrationId"`
}

type CreateProjectRequest

type CreateProjectRequest struct {
	ProjectTitle   string `json:"projectTitle"`
	OrganizationID string `json:"organizationId"`
	Name           string `json:"name"`
}

type CreateProjectResponse

type CreateProjectResponse struct {
	ID             string    `json:"id"`
	DateCreated    string    `json:"dateCreated"`
	DateUpdated    string    `json:"dateUpdated"`
	Name           string    `json:"name"`
	Website        string    `json:"website"`
	OrganizationID string    `json:"organizationId"`
	Projects       []Project `json:"projects"`
}

type Credential added in v1.2.0

type Credential struct {
	ID             string `json:"id"`
	DateCreated    string `json:"dateCreated"`
	DateUpdated    string `json:"dateUpdated"`
	Name           string `json:"name"`
	ProjectID      string `json:"projectId"`
	IntegrationID  string `json:"integrationId"`
	Provider       string `json:"provider"`
	Scheme         string `json:"scheme"`
	OnboardingOnly bool   `json:"onboardingOnly"`
	Status         string `json:"status"`
	DateRefreshed  string `json:"dateRefreshed"`
	DateValidUntil string `json:"dateValidUntil"`
}

type CustomIntegration added in v1.2.0

type CustomIntegration struct {
	ID                 string `json:"id"`
	DateCreated        string `json:"dateCreated"`
	DateUpdated        string `json:"dateUpdated"`
	ProjectID          string `json:"projectId"`
	Name               string `json:"name"`
	AuthenticationType string `json:"authenticationType"`
	Slug               string `json:"slug"`
}

type DecryptedCredential added in v1.2.0

type DecryptedCredential struct {
	ID            string                 `json:"id"`
	DateCreated   string                 `json:"dateCreated"`
	DateUpdated   string                 `json:"dateUpdated"`
	ProjectID     string                 `json:"projectId"`
	Values        map[string]interface{} `json:"values"`
	Provider      string                 `json:"provider"`
	IntegrationID string                 `json:"integrationId"`
	Scheme        string                 `json:"scheme"`
	Status        string                 `json:"status"`
}

type EnvironmentSecret

type EnvironmentSecret struct {
	ID          string      `json:"id"`
	Key         string      `json:"key"`
	ProjectID   string      `json:"projectId"`
	Hash        string      `json:"hash"`
	DateCreated string      `json:"dateCreated"`
	DateUpdated string      `json:"dateUpdated"`
	DateDeleted interface{} `json:"dateDeleted"`
}

type Integration added in v1.2.0

type Integration struct {
	ID                  string             `json:"id"`
	DateCreated         string             `json:"dateCreated"`
	DateUpdated         string             `json:"dateUpdated"`
	ProjectID           string             `json:"projectId"`
	CustomIntegrationID string             `json:"customIntegrationId"`
	Type                string             `json:"type"`
	IsActive            bool               `json:"isActive"`
	CustomIntegration   *CustomIntegration `json:"customIntegration"`
	ConnectedUserCount  int                `json:"connectedUserCount"`
}

type IntegrationConfig added in v1.2.0

type IntegrationConfig struct {
	ID            string `json:"id"`
	DateCreated   string `json:"dateCreated"`
	DateUpdated   string `json:"dateUpdated"`
	IntegrationID string `json:"integrationId"`
}

type InviteTeamMemberRequest

type InviteTeamMemberRequest struct {
	Role   string   `json:"role"`
	Emails []string `json:"emails"`
}

type OAuthValues added in v1.2.0

type OAuthValues struct {
	ClientID     string `json:"clientId"`
	ClientSecret string `json:"clientSecret"`
}

type Organization

type Organization struct {
	ID                     string                 `json:"id"`
	DateCreated            string                 `json:"dateCreated"`
	DateUpdated            string                 `json:"dateUpdated"`
	Name                   string                 `json:"name"`
	Website                string                 `json:"website"`
	Type                   string                 `json:"type"`
	Purpose                string                 `json:"purpose"`
	Referral               string                 `json:"referral"`
	Size                   string                 `json:"size"`
	Role                   string                 `json:"role"`
	CompletedQualification bool                   `json:"completedQualification"`
	FeatureFlagMeta        map[string]interface{} `json:"featureFlagMeta"`
}

type ParagonConfig

type ParagonConfig struct {
	PublicKey     string `json:"publicKey"`
	GeneratedDate string `json:"generatedDate"`
}

type Project

type Project struct {
	ID               string `json:"id"`
	Title            string `json:"title"`
	OwnerID          string `json:"ownerId"`
	TeamID           string `json:"teamId"`
	IsConnectProject bool   `json:"isConnectProject"`
	IsHidden         bool   `json:"isHidden"`
	DateCreated      string `json:"dateCreated"`
	DateUpdated      string `json:"dateUpdated"`
}

type SDKKey

type SDKKey struct {
	ID          string      `json:"id"`
	ProjectID   string      `json:"projectId"`
	AuthType    string      `json:"authType"`
	AuthConfig  AuthConfig  `json:"authConfig"`
	DateDeleted interface{} `json:"dateDeleted"`
	DateCreated string      `json:"dateCreated"`
	DateUpdated string      `json:"dateUpdated"`
	Revoked     bool        `json:"revoked"`
	PrivateKey  string      `json:"privateKey,omitempty"`
}

type Team

type Team struct {
	ID             string       `json:"id"`
	DateCreated    string       `json:"dateCreated"`
	DateUpdated    string       `json:"dateUpdated"`
	Name           string       `json:"name"`
	Website        string       `json:"website"`
	OrganizationID string       `json:"organizationId"`
	Organization   Organization `json:"organization"`
}

type TeamInvite

type TeamInvite struct {
	ID          string `json:"id"`
	DateCreated string `json:"dateCreated"`
	DateUpdated string `json:"dateUpdated"`
	Status      string `json:"status"`
	Role        string `json:"role"`
	Email       string `json:"email"`
	Team        Team   `json:"team"`
}

type TeamMember

type TeamMember struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	Email          string `json:"email"`
	UserID         string `json:"userId"`
	Role           string `json:"role"`
	OrganizationID string `json:"organizationId"`
}

type UpdateEnvironmentSecretRequest

type UpdateEnvironmentSecretRequest struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type UpdateProjectTitleRequest

type UpdateProjectTitleRequest struct {
	Title string `json:"title"`
}

Jump to

Keyboard shortcuts

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