Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
AccessToken represents the authentication token
func (*AccessToken) GetAuthorizationHeader ¶
func (at *AccessToken) GetAuthorizationHeader() string
GetAuthorizationHeader returns the formatted authorization header value
func (*AccessToken) IsExpired ¶
func (at *AccessToken) IsExpired() bool
IsExpired checks if the access token has expired
type Application ¶
type Application struct {
ID string
Name string
Description string
Metadata map[string]any
OrgID string
EnvTypes []EnvType
EnvCount string
CreatedAt time.Time
UpdatedAt time.Time
}
func NewApplication ¶
func NewApplication(name, description string, metadata map[string]any) *Application
type AuthResult ¶
type AuthResult struct {
Success bool
AccessToken *AccessToken
Error error
}
AuthResult represents the final result of an authentication process
type EnvType ¶
type EnvironmentSync ¶
type EnvironmentSync struct {
Local map[string]string
Remote map[string]EnvironmentVariable
ToAdd []EnvironmentVariable
ToUpdate []EnvironmentVariable
ToDelete []string
LastSynced time.Time
}
EnvironmentSync represents the sync state between local and remote environments
func NewEnvironmentSync ¶
func NewEnvironmentSync(local map[string]string, remote map[string]EnvironmentVariable) *EnvironmentSync
NewEnvironmentSync creates a new EnvironmentSync instance
func (*EnvironmentSync) CalculateDiff ¶
func (es *EnvironmentSync) CalculateDiff()
CalculateDiff determines which variables need to be added, updated, or deleted
func (*EnvironmentSync) GetSummary ¶
func (es *EnvironmentSync) GetSummary() SyncSummary
GetSummary returns a summary of the changes to be made
func (*EnvironmentSync) HasChanges ¶
func (es *EnvironmentSync) HasChanges() bool
HasChanges returns true if there are any differences between local and remote
func (*EnvironmentSync) ToMap ¶
func (es *EnvironmentSync) ToMap() map[string]string
ToMap converts the environment variables to a simple key-value map
type EnvironmentVariable ¶
EnvironmentVariable represents a single environment variable
type LoginCredentials ¶
type LoginCredentials struct {
DeviceCode string
UserCode string
VerificationUri string
ExpiresIn int
Interval int
ClientId string
AuthDomain string
}
LoginCredentials represents the device code information needed for OAuth device flow
func (*LoginCredentials) GetExpirationTime ¶
func (lc *LoginCredentials) GetExpirationTime() time.Time
GetExpirationTime returns when the device code expires
func (*LoginCredentials) GetInterval ¶
func (lc *LoginCredentials) GetInterval() time.Duration
GetInterval returns the polling interval in seconds
func (*LoginCredentials) GetUserCode ¶
func (lc *LoginCredentials) GetUserCode() string
GetUserCode returns the user code to be entered during authentication
func (*LoginCredentials) GetVerificationUri ¶
func (lc *LoginCredentials) GetVerificationUri() string
GetVerificationUri returns the verification URI for user authentication
func (*LoginCredentials) IsExpired ¶
func (lc *LoginCredentials) IsExpired() bool
IsExpired checks if the device code has expired
type SyncConfig ¶
SyncConfig represents the configuration needed for syncing
type SyncSummary ¶
SyncSummary represents a summary of sync changes