Documentation
¶
Index ¶
- type APIClient
- type APIError
- type Client
- func (c *Client) CanStartTrial(ctx context.Context, orgLogin string) (bool, int, error)
- func (c *Client) CheckGitHubAppInstallation(ctx context.Context, repoOwner, repoName string) (*GitHubAppInstallationStatus, error)
- func (c *Client) CheckVaultExists(ctx context.Context, repoFullName string) (bool, error)
- func (c *Client) ConnectWithToken(ctx context.Context, provider, providerToken string) (*ConnectTokenResponse, error)
- func (c *Client) DeleteConnection(ctx context.Context, connectionID string) error
- func (c *Client) ExecuteSync(ctx context.Context, repo string, opts SyncOptions) (*SyncResult, error)
- func (c *Client) GetAllProviderProjects(ctx context.Context, provider string) ([]ProviderProject, []Connection, error)
- func (c *Client) GetConnections(ctx context.Context) ([]Connection, error)
- func (c *Client) GetOrganization(ctx context.Context, orgLogin string) (*OrganizationInfo, error)
- func (c *Client) GetProviderAuthURL(provider string) string
- func (c *Client) GetProviders(ctx context.Context) ([]Provider, error)
- func (c *Client) GetRepoIdsFromBackend(ctx context.Context, repoFullName string) (*RepoIds, error)
- func (c *Client) GetSyncDiff(ctx context.Context, repo string, opts SyncOptions) (*SyncDiff, error)
- func (c *Client) GetSyncPreview(ctx context.Context, repo string, opts SyncOptions) (*SyncPreview, error)
- func (c *Client) GetSyncStatus(ctx context.Context, repo, connectionID, projectID, environment string) (*SyncStatus, error)
- func (c *Client) GetVaultDetails(ctx context.Context, repoFullName string) (*VaultDetails, error)
- func (c *Client) GetVaultEnvironments(ctx context.Context, repoFullName string) ([]string, error)
- func (c *Client) InitVault(ctx context.Context, repoFullName string) (*InitVaultResponse, error)
- func (c *Client) LinkProject(ctx context.Context, repo string, opts SyncOptions) (*ProjectLink, error)
- func (c *Client) PollDeviceLogin(ctx context.Context, deviceCode string) (*DevicePollResponse, error)
- func (c *Client) PullSecrets(ctx context.Context, repo, env string) (*PullSecretsResponse, error)
- func (c *Client) PushSecrets(ctx context.Context, repo, env string, secrets map[string]string) (*PushSecretsResponse, error)
- func (c *Client) SetTimeout(timeout time.Duration)
- func (c *Client) StartDeviceLogin(ctx context.Context, repository string, repoIds *RepoIds) (*DeviceStartResponse, error)
- func (c *Client) StartOrganizationTrial(ctx context.Context, orgLogin string) (*StartTrialResponse, error)
- func (c *Client) ValidateToken(ctx context.Context) (*ValidateTokenResponse, error)
- type ConnectTokenResponse
- type Connection
- type DevicePollResponse
- type DeviceStartResponse
- type GitHubAppInstallationStatus
- type InitVaultResponse
- type MockClient
- func (m *MockClient) CheckGitHubAppInstallation(ctx context.Context, repoOwner, repoName string) (*GitHubAppInstallationStatus, error)
- func (m *MockClient) CheckVaultExists(ctx context.Context, repoFullName string) (bool, error)
- func (m *MockClient) ConnectWithToken(ctx context.Context, provider, providerToken string) (*ConnectTokenResponse, error)
- func (m *MockClient) DeleteConnection(ctx context.Context, connectionID string) error
- func (m *MockClient) ExecuteSync(ctx context.Context, repo string, opts SyncOptions) (*SyncResult, error)
- func (m *MockClient) GetAllProviderProjects(ctx context.Context, provider string) ([]ProviderProject, []Connection, error)
- func (m *MockClient) GetConnections(ctx context.Context) ([]Connection, error)
- func (m *MockClient) GetProviderAuthURL(provider string) string
- func (m *MockClient) GetProviders(ctx context.Context) ([]Provider, error)
- func (m *MockClient) GetRepoIdsFromBackend(ctx context.Context, repoFullName string) (*RepoIds, error)
- func (m *MockClient) GetSyncDiff(ctx context.Context, repo string, opts SyncOptions) (*SyncDiff, error)
- func (m *MockClient) GetSyncPreview(ctx context.Context, repo string, opts SyncOptions) (*SyncPreview, error)
- func (m *MockClient) GetSyncStatus(ctx context.Context, repo, connectionID, projectID, environment string) (*SyncStatus, error)
- func (m *MockClient) GetVaultDetails(ctx context.Context, repoFullName string) (*VaultDetails, error)
- func (m *MockClient) GetVaultEnvironments(ctx context.Context, repoFullName string) ([]string, error)
- func (m *MockClient) InitVault(ctx context.Context, repoFullName string) (*InitVaultResponse, error)
- func (m *MockClient) PollDeviceLogin(ctx context.Context, deviceCode string) (*DevicePollResponse, error)
- func (m *MockClient) PullSecrets(ctx context.Context, repo, env string) (*PullSecretsResponse, error)
- func (m *MockClient) PushSecrets(ctx context.Context, repo, env string, secrets map[string]string) (*PushSecretsResponse, error)
- func (m *MockClient) StartDeviceLogin(ctx context.Context, repository string, repoIds *RepoIds) (*DeviceStartResponse, error)
- func (m *MockClient) StartOrganizationTrial(ctx context.Context, orgLogin string) (*StartTrialResponse, error)
- func (m *MockClient) ValidateToken(ctx context.Context) (*ValidateTokenResponse, error)
- type OrganizationInfo
- type ProjectLink
- type Provider
- type ProviderProject
- type PullSecretsResponse
- type PushSecretsResponse
- type RepoIds
- type StartTrialResponse
- type SyncDiff
- type SyncOptions
- type SyncPreview
- type SyncResult
- type SyncStatus
- type TrialEligibility
- type TrialInfo
- type ValidateTokenResponse
- type VaultDetails
- type VaultInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient interface {
// Auth methods
StartDeviceLogin(ctx context.Context, repository string, repoIds *RepoIds) (*DeviceStartResponse, error)
PollDeviceLogin(ctx context.Context, deviceCode string) (*DevicePollResponse, error)
ValidateToken(ctx context.Context) (*ValidateTokenResponse, error)
CheckGitHubAppInstallation(ctx context.Context, repoOwner, repoName string) (*GitHubAppInstallationStatus, error)
GetRepoIdsFromBackend(ctx context.Context, repoFullName string) (*RepoIds, error)
// Vault methods
InitVault(ctx context.Context, repoFullName string) (*InitVaultResponse, error)
CheckVaultExists(ctx context.Context, repoFullName string) (bool, error)
GetVaultDetails(ctx context.Context, repoFullName string) (*VaultDetails, error)
GetVaultEnvironments(ctx context.Context, repoFullName string) ([]string, error)
// Org methods
StartOrganizationTrial(ctx context.Context, orgLogin string) (*StartTrialResponse, error)
// Secrets methods
PushSecrets(ctx context.Context, repo, env string, secrets map[string]string) (*PushSecretsResponse, error)
PullSecrets(ctx context.Context, repo, env string) (*PullSecretsResponse, error)
// Provider methods
GetProviders(ctx context.Context) ([]Provider, error)
GetConnections(ctx context.Context) ([]Connection, error)
DeleteConnection(ctx context.Context, connectionID string) error
GetProviderAuthURL(provider string) string
ConnectWithToken(ctx context.Context, provider, providerToken string) (*ConnectTokenResponse, error)
GetAllProviderProjects(ctx context.Context, provider string) ([]ProviderProject, []Connection, error)
// Sync methods
GetSyncStatus(ctx context.Context, repo, connectionID, projectID, environment string) (*SyncStatus, error)
GetSyncDiff(ctx context.Context, repo string, opts SyncOptions) (*SyncDiff, error)
GetSyncPreview(ctx context.Context, repo string, opts SyncOptions) (*SyncPreview, error)
ExecuteSync(ctx context.Context, repo string, opts SyncOptions) (*SyncResult, error)
}
APIClient defines the interface for the Keyway API client This interface enables mocking in tests
type APIError ¶
type APIError struct {
StatusCode int `json:"-"`
Type string `json:"type,omitempty"`
Title string `json:"title,omitempty"`
Detail string `json:"detail,omitempty"`
UpgradeURL string `json:"upgradeUrl,omitempty"`
TrialInfo *TrialEligibility `json:"trialInfo,omitempty"`
}
APIError represents an error from the API (RFC 7807)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Keyway API client
func NewClientWithVersion ¶
NewClientWithVersion creates a new API client with version
func (*Client) CanStartTrial ¶
CanStartTrial checks if an organization can start a trial
func (*Client) CheckGitHubAppInstallation ¶
func (c *Client) CheckGitHubAppInstallation(ctx context.Context, repoOwner, repoName string) (*GitHubAppInstallationStatus, error)
CheckGitHubAppInstallation checks if the GitHub App is installed for a repo
func (*Client) CheckVaultExists ¶
CheckVaultExists checks if a vault exists for a repository
func (*Client) ConnectWithToken ¶
func (c *Client) ConnectWithToken(ctx context.Context, provider, providerToken string) (*ConnectTokenResponse, error)
ConnectWithToken connects to a provider using a token (e.g., Railway)
func (*Client) DeleteConnection ¶
DeleteConnection removes a provider connection
func (*Client) ExecuteSync ¶
func (c *Client) ExecuteSync(ctx context.Context, repo string, opts SyncOptions) (*SyncResult, error)
ExecuteSync performs the sync operation
func (*Client) GetAllProviderProjects ¶
func (c *Client) GetAllProviderProjects(ctx context.Context, provider string) ([]ProviderProject, []Connection, error)
GetAllProviderProjects returns all projects from all connections for a provider
func (*Client) GetConnections ¶
func (c *Client) GetConnections(ctx context.Context) ([]Connection, error)
GetConnections returns user's provider connections
func (*Client) GetOrganization ¶
GetOrganization retrieves information about an organization
func (*Client) GetProviderAuthURL ¶
GetProviderAuthURL returns the OAuth URL for a provider
func (*Client) GetProviders ¶
GetProviders returns available providers
func (*Client) GetRepoIdsFromBackend ¶
GetRepoIdsFromBackend fetches repo IDs from the backend Works for private repos if GitHub App is installed with "all repos" on the org
func (*Client) GetSyncDiff ¶
GetSyncDiff returns the diff between Keyway and provider secrets
func (*Client) GetSyncPreview ¶
func (c *Client) GetSyncPreview(ctx context.Context, repo string, opts SyncOptions) (*SyncPreview, error)
GetSyncPreview returns what will change during sync
func (*Client) GetSyncStatus ¶
func (c *Client) GetSyncStatus(ctx context.Context, repo, connectionID, projectID, environment string) (*SyncStatus, error)
GetSyncStatus returns the sync status for a vault/project pair
func (*Client) GetVaultDetails ¶ added in v0.5.1
GetVaultDetails returns detailed information about a vault including secret count
func (*Client) GetVaultEnvironments ¶
GetVaultEnvironments returns the environments for a vault
func (*Client) LinkProject ¶ added in v0.5.2
func (c *Client) LinkProject(ctx context.Context, repo string, opts SyncOptions) (*ProjectLink, error)
LinkProject links a vault to a provider project without syncing
func (*Client) PollDeviceLogin ¶
func (c *Client) PollDeviceLogin(ctx context.Context, deviceCode string) (*DevicePollResponse, error)
PollDeviceLogin polls for device login completion
func (*Client) PullSecrets ¶
PullSecrets downloads secrets from the vault
func (*Client) PushSecrets ¶
func (c *Client) PushSecrets(ctx context.Context, repo, env string, secrets map[string]string) (*PushSecretsResponse, error)
PushSecrets uploads secrets to the vault
func (*Client) SetTimeout ¶
SetTimeout sets a custom timeout for requests
func (*Client) StartDeviceLogin ¶
func (c *Client) StartDeviceLogin(ctx context.Context, repository string, repoIds *RepoIds) (*DeviceStartResponse, error)
StartDeviceLogin initiates the device login flow
func (*Client) StartOrganizationTrial ¶
func (c *Client) StartOrganizationTrial(ctx context.Context, orgLogin string) (*StartTrialResponse, error)
StartOrganizationTrial starts a trial for an organization
func (*Client) ValidateToken ¶
func (c *Client) ValidateToken(ctx context.Context) (*ValidateTokenResponse, error)
ValidateToken validates the current token
type ConnectTokenResponse ¶
type ConnectTokenResponse struct {
Success bool `json:"success"`
User struct {
Username string `json:"username"`
TeamName *string `json:"teamName,omitempty"`
} `json:"user"`
}
ConnectTokenResponse represents the response from token-based connection
type Connection ¶
type Connection struct {
ID string `json:"id"`
Provider string `json:"provider"`
ProviderTeamID *string `json:"providerTeamId,omitempty"`
CreatedAt string `json:"createdAt"`
}
Connection represents a provider connection
type DevicePollResponse ¶
type DevicePollResponse struct {
Status string `json:"status"` // pending, approved, expired, denied
KeywayToken string `json:"keywayToken,omitempty"`
GitHubLogin string `json:"githubLogin,omitempty"`
ExpiresAt string `json:"expiresAt,omitempty"`
Message string `json:"message,omitempty"`
}
DevicePollResponse is the response from polling device login
type DeviceStartResponse ¶
type DeviceStartResponse struct {
DeviceCode string `json:"deviceCode"`
UserCode string `json:"userCode"`
VerificationURIComplete string `json:"verificationUriComplete"`
VerificationURI string `json:"verificationUri"`
ExpiresIn int `json:"expiresIn"`
Interval int `json:"interval"`
GitHubAppInstallURL string `json:"githubAppInstallUrl,omitempty"`
}
DeviceStartResponse is the response from starting device login
type GitHubAppInstallationStatus ¶
type GitHubAppInstallationStatus struct {
Installed bool `json:"installed"`
InstallationID int `json:"installationId,omitempty"`
InstallURL string `json:"installUrl"`
Message string `json:"message,omitempty"`
}
GitHubAppInstallationStatus is the status of GitHub App installation
type InitVaultResponse ¶
type InitVaultResponse struct {
VaultID string `json:"vaultId"`
RepoFullName string `json:"repoFullName"`
Message string `json:"message"`
}
InitVaultResponse is the response from initializing a vault
type MockClient ¶
type MockClient struct {
// Auth mocks
StartDeviceLoginFn func(ctx context.Context, repository string, repoIds *RepoIds) (*DeviceStartResponse, error)
PollDeviceLoginFn func(ctx context.Context, deviceCode string) (*DevicePollResponse, error)
ValidateTokenFn func(ctx context.Context) (*ValidateTokenResponse, error)
CheckGitHubAppInstallationFn func(ctx context.Context, repoOwner, repoName string) (*GitHubAppInstallationStatus, error)
GetRepoIdsFromBackendFn func(ctx context.Context, repoFullName string) (*RepoIds, error)
// Vault mocks
InitVaultFn func(ctx context.Context, repoFullName string) (*InitVaultResponse, error)
CheckVaultExistsFn func(ctx context.Context, repoFullName string) (bool, error)
GetVaultDetailsFn func(ctx context.Context, repoFullName string) (*VaultDetails, error)
GetVaultEnvironmentsFn func(ctx context.Context, repoFullName string) ([]string, error)
// Secrets mocks
PushSecretsFn func(ctx context.Context, repo, env string, secrets map[string]string) (*PushSecretsResponse, error)
PullSecretsFn func(ctx context.Context, repo, env string) (*PullSecretsResponse, error)
// Provider mocks
GetProvidersFn func(ctx context.Context) ([]Provider, error)
GetConnectionsFn func(ctx context.Context) ([]Connection, error)
DeleteConnectionFn func(ctx context.Context, connectionID string) error
GetProviderAuthURLFn func(provider string) string
ConnectWithTokenFn func(ctx context.Context, provider, providerToken string) (*ConnectTokenResponse, error)
GetAllProviderProjectsFn func(ctx context.Context, provider string) ([]ProviderProject, []Connection, error)
// Sync mocks
GetSyncStatusFn func(ctx context.Context, repo, connectionID, projectID, environment string) (*SyncStatus, error)
GetSyncDiffFn func(ctx context.Context, repo string, opts SyncOptions) (*SyncDiff, error)
GetSyncPreviewFn func(ctx context.Context, repo string, opts SyncOptions) (*SyncPreview, error)
ExecuteSyncFn func(ctx context.Context, repo string, opts SyncOptions) (*SyncResult, error)
// Call tracking
Calls map[string]int
}
MockClient is a mock implementation of APIClient for testing
func NewMockClient ¶
func NewMockClient() *MockClient
NewMockClient creates a new mock client with default implementations
func (*MockClient) CheckGitHubAppInstallation ¶
func (m *MockClient) CheckGitHubAppInstallation(ctx context.Context, repoOwner, repoName string) (*GitHubAppInstallationStatus, error)
func (*MockClient) CheckVaultExists ¶
func (*MockClient) ConnectWithToken ¶
func (m *MockClient) ConnectWithToken(ctx context.Context, provider, providerToken string) (*ConnectTokenResponse, error)
func (*MockClient) DeleteConnection ¶
func (m *MockClient) DeleteConnection(ctx context.Context, connectionID string) error
func (*MockClient) ExecuteSync ¶
func (m *MockClient) ExecuteSync(ctx context.Context, repo string, opts SyncOptions) (*SyncResult, error)
func (*MockClient) GetAllProviderProjects ¶
func (m *MockClient) GetAllProviderProjects(ctx context.Context, provider string) ([]ProviderProject, []Connection, error)
func (*MockClient) GetConnections ¶
func (m *MockClient) GetConnections(ctx context.Context) ([]Connection, error)
func (*MockClient) GetProviderAuthURL ¶
func (m *MockClient) GetProviderAuthURL(provider string) string
func (*MockClient) GetProviders ¶
func (m *MockClient) GetProviders(ctx context.Context) ([]Provider, error)
Provider methods
func (*MockClient) GetRepoIdsFromBackend ¶
func (*MockClient) GetSyncDiff ¶
func (m *MockClient) GetSyncDiff(ctx context.Context, repo string, opts SyncOptions) (*SyncDiff, error)
func (*MockClient) GetSyncPreview ¶
func (m *MockClient) GetSyncPreview(ctx context.Context, repo string, opts SyncOptions) (*SyncPreview, error)
func (*MockClient) GetSyncStatus ¶
func (m *MockClient) GetSyncStatus(ctx context.Context, repo, connectionID, projectID, environment string) (*SyncStatus, error)
Sync methods
func (*MockClient) GetVaultDetails ¶ added in v0.5.1
func (m *MockClient) GetVaultDetails(ctx context.Context, repoFullName string) (*VaultDetails, error)
func (*MockClient) GetVaultEnvironments ¶
func (*MockClient) InitVault ¶
func (m *MockClient) InitVault(ctx context.Context, repoFullName string) (*InitVaultResponse, error)
Vault methods
func (*MockClient) PollDeviceLogin ¶
func (m *MockClient) PollDeviceLogin(ctx context.Context, deviceCode string) (*DevicePollResponse, error)
func (*MockClient) PullSecrets ¶
func (m *MockClient) PullSecrets(ctx context.Context, repo, env string) (*PullSecretsResponse, error)
func (*MockClient) PushSecrets ¶
func (m *MockClient) PushSecrets(ctx context.Context, repo, env string, secrets map[string]string) (*PushSecretsResponse, error)
Secrets methods
func (*MockClient) StartDeviceLogin ¶
func (m *MockClient) StartDeviceLogin(ctx context.Context, repository string, repoIds *RepoIds) (*DeviceStartResponse, error)
Auth methods
func (*MockClient) StartOrganizationTrial ¶
func (m *MockClient) StartOrganizationTrial(ctx context.Context, orgLogin string) (*StartTrialResponse, error)
func (*MockClient) ValidateToken ¶
func (m *MockClient) ValidateToken(ctx context.Context) (*ValidateTokenResponse, error)
type OrganizationInfo ¶
type OrganizationInfo struct {
ID string `json:"id"`
Login string `json:"login"`
DisplayName string `json:"display_name"`
AvatarURL string `json:"avatar_url"`
Plan string `json:"plan"`
EffectivePlan string `json:"effective_plan"`
MemberCount int `json:"member_count"`
VaultCount int `json:"vault_count"`
Trial TrialInfo `json:"trial"`
Role string `json:"role"`
}
OrganizationInfo contains information about an organization
type ProjectLink ¶ added in v0.5.2
type ProjectLink struct {
ID string `json:"id"`
ProjectID string `json:"projectId"`
ProjectName *string `json:"projectName"`
KeywayEnvironment string `json:"keywayEnvironment"`
ProviderEnvironment string `json:"providerEnvironment"`
LastSyncedAt *string `json:"lastSyncedAt"`
IsNew bool `json:"isNew"`
}
ProjectLink represents a link between a vault and a provider project
type Provider ¶
type Provider struct {
Name string `json:"name"`
DisplayName string `json:"displayName"`
Configured bool `json:"configured"`
}
Provider represents a supported provider
type ProviderProject ¶
type ProviderProject struct {
ID string `json:"id"`
Name string `json:"name"`
ServiceID *string `json:"serviceId,omitempty"` // Railway: service ID
ServiceName *string `json:"serviceName,omitempty"` // Railway: service name
LinkedRepo *string `json:"linkedRepo,omitempty"`
Environments []string `json:"environments,omitempty"`
ConnectionID string `json:"connectionId"`
TeamID *string `json:"teamId,omitempty"`
TeamName *string `json:"teamName,omitempty"`
}
ProviderProject represents a project from a provider
type PullSecretsResponse ¶
type PullSecretsResponse struct {
Content string `json:"content"`
}
PullSecretsResponse is the response from pulling secrets
type PushSecretsResponse ¶
type PushSecretsResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Stats *struct {
Created int `json:"created"`
Updated int `json:"updated"`
Deleted int `json:"deleted"`
} `json:"stats,omitempty"`
}
PushSecretsResponse is the response from pushing secrets
type StartTrialResponse ¶
type StartTrialResponse struct {
Message string `json:"message"`
TrialEnds string `json:"trial_ends"`
}
StartTrialResponse is the response from starting a trial
type SyncDiff ¶
type SyncDiff struct {
KeywayCount int `json:"keywayCount"`
ProviderCount int `json:"providerCount"`
OnlyInKeyway []string `json:"onlyInKeyway"`
OnlyInProvider []string `json:"onlyInProvider"`
Different []string `json:"different"`
Same []string `json:"same"`
}
SyncDiff represents the difference between Keyway and provider secrets
type SyncOptions ¶
type SyncOptions struct {
ConnectionID string `json:"connectionId"`
ProjectID string `json:"projectId"`
ServiceID *string `json:"serviceId,omitempty"`
KeywayEnvironment string `json:"keywayEnvironment"`
ProviderEnvironment string `json:"providerEnvironment"`
Direction string `json:"direction,omitempty"` // "push" or "pull"
AllowDelete bool `json:"allowDelete,omitempty"`
}
SyncOptions contains options for sync operations
type SyncPreview ¶
type SyncPreview struct {
ToCreate []string `json:"toCreate"`
ToUpdate []string `json:"toUpdate"`
ToDelete []string `json:"toDelete"`
ToSkip []string `json:"toSkip"`
}
SyncPreview represents what will change during sync
type SyncResult ¶
type SyncResult struct {
Success bool `json:"success"`
Error string `json:"error,omitempty"`
Stats struct {
Created int `json:"created"`
Updated int `json:"updated"`
Deleted int `json:"deleted"`
} `json:"stats"`
}
SyncResult represents the result of a sync operation
type SyncStatus ¶
type SyncStatus struct {
IsFirstSync bool `json:"isFirstSync"`
VaultIsEmpty bool `json:"vaultIsEmpty"`
ProviderHasSecrets bool `json:"providerHasSecrets"`
ProviderSecretCount int `json:"providerSecretCount"`
}
SyncStatus represents the current sync status
type TrialEligibility ¶
type TrialEligibility struct {
Eligible bool `json:"eligible"`
DaysAvailable int `json:"daysAvailable"`
OrgLogin string `json:"orgLogin"`
Reason string `json:"reason,omitempty"`
}
TrialEligibility contains trial information for org repos
type TrialInfo ¶
type TrialInfo struct {
Status string `json:"status"` // "none", "active", "expired", "converted"
DaysRemaining *int `json:"days_remaining"`
EndsAt *string `json:"ends_at"`
TrialDurationDays int `json:"trial_duration_days"`
}
TrialInfo contains trial status information
type ValidateTokenResponse ¶
type ValidateTokenResponse struct {
Login string `json:"login"`
Username string `json:"username"`
GitHubID interface{} `json:"githubId,omitempty"` // Can be string or number
Plan string `json:"plan,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
}
ValidateTokenResponse is the response from validating a token
type VaultDetails ¶ added in v0.5.1
type VaultDetails struct {
ID string `json:"id"`
RepoFullName string `json:"repoFullName"`
SecretCount int `json:"secretCount"`
}
VaultDetails contains detailed vault information including secret count