Documentation
¶
Index ¶
- Constants
- Variables
- func ChromeWebStoreExtensionDownloadURL(extensionID string) (string, error)
- func DefaultArchiveFolderName(profileName, profileID string, exportedAt time.Time) string
- func IsRateLimitedError(err error) bool
- func IsRetryableError(err error) bool
- func IsTemporaryError(err error) bool
- func RetryAfter(err error) time.Duration
- type AllProfileStatusesData
- type AllProfileStatusesResponse
- type ArchiveManager
- type ArchiveManagerOp
- type ArgError
- type AssignTagsRequest
- type AutomationEndpointError
- type AutomationType
- type BatchItemResult
- type BatchProfileOperationError
- type BatchResult
- type BatchSummary
- type BrowserCookie
- type Client
- type CloneProfileRequest
- type CommandParam
- type CommandParams
- type CookieBundle
- type CookieExportData
- type CookieExportRequest
- type CookieExportResponse
- type CookieImportRequest
- type CookieListData
- type CookieListResponse
- type CookieWebsite
- type CookieWebsitesResponse
- type CookiesMetadataData
- type CookiesMetadataResponse
- type CookiesService
- type CookiesServiceOp
- func (s *CookiesServiceOp) CreateMetadata(ctx context.Context, reqBody *CreateCookiesMetadataRequest) (*CookiesMetadataResponse, *Response, error)
- func (s *CookiesServiceOp) Export(ctx context.Context, reqBody *CookieExportRequest) (*CookieExportResponse, *Response, error)
- func (s *CookiesServiceOp) Import(ctx context.Context, reqBody *CookieImportRequest) (*EmptyDataResponse, *Response, error)
- func (s *CookiesServiceOp) List(ctx context.Context, profileID string) (*CookieListResponse, *Response, error)
- func (s *CookiesServiceOp) ListWebsites(ctx context.Context) (*CookieWebsitesResponse, *Response, error)
- func (s *CookiesServiceOp) SeedProfileCookies(ctx context.Context, opts SeedProfileCookiesOptions) (*SeedProfileCookiesResult, error)
- func (s *CookiesServiceOp) UpdateMetadata(ctx context.Context, reqBody *UpdateCookiesMetadataRequest) (*EmptyDataResponse, *Response, error)
- type CreateAndUploadObjectData
- type CreateAndUploadObjectRequest
- type CreateAndUploadObjectResponse
- type CreateChromeWebStoreExtensionRequest
- type CreateCookiesMetadataRequest
- type CreateExtensionFromURLRequest
- type CreateFolderRequest
- type CreateFolderResponse
- type CreateProfileRequest
- type CreateProfileResponse
- type CreateProfileTemplateRequest
- type CreateProfilesAndVerifyOptions
- type CreateTagItem
- type CreateTagsRequest
- type CreatedFolderData
- type CreatedProfileIDs
- type CreatedProfilesWorkflowResult
- type DeleteFoldersRequest
- type DeleteProfilesRequest
- type DownloadResourceResponse
- type EmptyDataResponse
- type EnableExtensionForProfileByNameOptions
- type EnabledExtensionWorkflowResult
- type EnsureHealthyProfileProxyOptions
- type EnsureHealthyProxyOptions
- type Envelope
- type ErrorClass
- type ErrorResponse
- func (e *ErrorResponse) Class() ErrorClass
- func (e *ErrorResponse) Error() string
- func (e *ErrorResponse) IsRateLimited() bool
- func (e *ErrorResponse) RetryAfter() time.Duration
- func (e *ErrorResponse) Retryable() bool
- func (e *ErrorResponse) StatusCode() int
- func (e *ErrorResponse) Temporary() bool
- type ExportJobState
- type ExportProfileByNameToFolderOptions
- type ExportProfileResponse
- type ExportProfileToFolderOptions
- type ExportStatusResponse
- type ExportStatusesData
- type ExportStatusesResponse
- type ExportedProfileWorkflowResult
- type FindProfileByNameVerifiedOptions
- type FindProfileOptions
- type Fingerprint
- type Folder
- type FoldersService
- type FoldersServiceOp
- func (s *FoldersServiceOp) Create(ctx context.Context, reqBody *CreateFolderRequest) (*CreateFolderResponse, *Response, error)
- func (s *FoldersServiceOp) Delete(ctx context.Context, reqBody *DeleteFoldersRequest) (*EmptyDataResponse, *Response, error)
- func (s *FoldersServiceOp) List(ctx context.Context) (*ListFoldersResponse, *Response, error)
- func (s *FoldersServiceOp) Update(ctx context.Context, reqBody *UpdateFolderRequest) (*EmptyDataResponse, *Response, error)
- type GenerateProfileProxyByNameOptions
- type GenerateProfileProxyRequest
- type GenerateProfileProxyResult
- type GenerateProxyRequest
- type GenerateProxyResponse
- type GeneratedProfileProxyWorkflowResult
- type GeneratedProxyConnection
- type GeolocationFingerprint
- type GraphicFingerprint
- type HTTPProxyChecker
- type HTTPProxyCheckerConfig
- type ImportJobState
- type ImportProfileRequest
- type ImportProfileResponse
- type ImportProfileWorkflowOptions
- type ImportStatusResponse
- type ImportStatusesData
- type ImportStatusesResponse
- type ImportedProfileWorkflowResult
- type LauncherActiveCounter
- type LauncherHealthData
- type LauncherHealthResponse
- type LauncherService
- type LauncherServiceOp
- func (s *LauncherServiceOp) Health(ctx context.Context) (*LauncherHealthResponse, *Response, error)
- func (s *LauncherServiceOp) QuickStatuses(ctx context.Context) (*QuickProfileStatusesResponse, *Response, error)
- func (s *LauncherServiceOp) SaveQuick(ctx context.Context, reqBody *SaveQuickProfileRequest) (*EmptyDataResponse, *Response, error)
- func (s *LauncherServiceOp) Start(ctx context.Context, folderID, profileID string, opts StartProfileOptions) (*StartProfileResponse, *Response, error)
- func (s *LauncherServiceOp) StartQuick(ctx context.Context, reqBody *StartQuickProfileRequest) (*StartQuickProfileResponse, *Response, error)
- func (s *LauncherServiceOp) Status(ctx context.Context, profileID string) (*ProfileRuntimeStatusResponse, *Response, error)
- func (s *LauncherServiceOp) Statuses(ctx context.Context) (*AllProfileStatusesResponse, *Response, error)
- func (s *LauncherServiceOp) Stop(ctx context.Context, profileID string) (*EmptyDataResponse, *Response, error)
- func (s *LauncherServiceOp) StopAll(ctx context.Context, opts StopAllProfilesOptions) (*EmptyDataResponse, *Response, error)
- func (s *LauncherServiceOp) ValidateProxy(ctx context.Context, reqBody *ValidateProxyRequest) (*ValidateProxyResponse, *Response, error)
- func (s *LauncherServiceOp) Version(ctx context.Context) (*LauncherVersionResponse, *Response, error)
- func (s *LauncherServiceOp) WaitForRunning(ctx context.Context, profileID string, opts PollOptions) (*ProfileRuntimeStatusResponse, *Response, error)
- type LauncherVersionData
- type LauncherVersionResponse
- type ListFoldersData
- type ListFoldersResponse
- type ListOptions
- type ListResourceMetasOptions
- type LocalToCloudObjectRequest
- type LocaleProfile
- type LocalizationFingerprint
- type ManagedExportResult
- type MediaDevicesFingerprint
- type MoveProfilesRequest
- type NavigatorFingerprint
- type ObjectProfileUsage
- type ObjectProfileUsagesResponse
- type Option
- func WithBaseURL(raw string) Option
- func WithCookiesURL(raw string) Option
- func WithHTTPClient(httpClient *http.Client) Option
- func WithLauncherURL(raw string) Option
- func WithProxyURL(raw string) Option
- func WithRetry(opts RetryOptions) Option
- func WithTimeout(timeout time.Duration) Option
- func WithToken(token string) Option
- func WithUserAgent(userAgent string) Option
- type OrganizedArchive
- type PatchProfileForProxyOptions
- type PatchProfileRequest
- type PollOptions
- type Profile
- type ProfileBatchFailure
- type ProfileFlags
- type ProfileMeta
- type ProfileMetasData
- type ProfileMetasRequest
- type ProfileMetasResponse
- type ProfileObjectUsage
- type ProfileObjectUsagesRequest
- type ProfileObjectUsagesResponse
- type ProfileParameters
- type ProfileRuntimeStatus
- type ProfileRuntimeStatusResponse
- type ProfileSummary
- type ProfileSummaryResponse
- type ProfilesService
- type ProfilesServiceOp
- func (s *ProfilesServiceOp) Clone(ctx context.Context, reqBody *CloneProfileRequest) (*CreateProfileResponse, *Response, error)
- func (s *ProfilesServiceOp) Create(ctx context.Context, reqBody *CreateProfileRequest) (*CreateProfileResponse, *Response, error)
- func (s *ProfilesServiceOp) Delete(ctx context.Context, reqBody *DeleteProfilesRequest) (*EmptyDataResponse, *Response, error)
- func (s *ProfilesServiceOp) FindByName(ctx context.Context, profileName string, opts *FindProfileOptions) (*Profile, *Response, error)
- func (s *ProfilesServiceOp) GetMeta(ctx context.Context, profileID string) (*ProfileMeta, *Response, error)
- func (s *ProfilesServiceOp) GetMetas(ctx context.Context, reqBody *ProfileMetasRequest) (*ProfileMetasResponse, *Response, error)
- func (s *ProfilesServiceOp) GetSummary(ctx context.Context, metaID string) (*ProfileSummaryResponse, *Response, error)
- func (s *ProfilesServiceOp) Move(ctx context.Context, reqBody *MoveProfilesRequest) (*EmptyDataResponse, *Response, error)
- func (s *ProfilesServiceOp) Patch(ctx context.Context, reqBody *PatchProfileRequest) (*EmptyDataResponse, *Response, error)
- func (s *ProfilesServiceOp) Restore(ctx context.Context, reqBody *RestoreProfilesRequest) (*EmptyDataResponse, *Response, error)
- func (s *ProfilesServiceOp) Search(ctx context.Context, reqBody *SearchProfilesRequest) (*SearchProfilesResponse, *Response, error)
- func (s *ProfilesServiceOp) Update(ctx context.Context, reqBody *UpdateProfileRequest) (*EmptyDataResponse, *Response, error)
- type Proxy
- type ProxyCheckResult
- type ProxyChecker
- type ProxyProtocol
- type ProxyService
- type ProxyServiceOp
- func (s *ProxyServiceOp) BuildProfileProxy(conn *GeneratedProxyConnection) *Proxy
- func (s *ProxyServiceOp) EnsureHealthyProxy(ctx context.Context, current *Proxy, opts EnsureHealthyProfileProxyOptions) (*Proxy, bool, error)
- func (s *ProxyServiceOp) Generate(ctx context.Context, reqBody *GenerateProxyRequest) (*GenerateProxyResponse, *Response, error)
- func (s *ProxyServiceOp) GenerateProfileProxy(ctx context.Context, reqBody *GenerateProfileProxyRequest) (*GenerateProfileProxyResult, error)
- func (s *ProxyServiceOp) GetUsage(ctx context.Context) (*ProxyUsageResponse, *Response, error)
- func (s *ProxyServiceOp) ParseConnectionString(raw string, protocol ProxyProtocol) (*GeneratedProxyConnection, error)
- type ProxySessionType
- type ProxyUsageResponse
- type ProxyValidationData
- type QuickProfileRuntimeStatus
- type QuickProfileStatusesData
- type QuickProfileStatusesResponse
- type RemoveTagsRequest
- type ResourceMeta
- type ResourceMetaResponse
- type ResourceMetasData
- type ResourceMetasResponse
- type ResourceType
- type ResourceTypesData
- type ResourceTypesResponse
- type ResourcesService
- type ResourcesServiceOp
- func (s *ResourcesServiceOp) CreateAndUpload(ctx context.Context, reqBody *CreateAndUploadObjectRequest) (*CreateAndUploadObjectResponse, *Response, error)
- func (s *ResourcesServiceOp) CreateExtensionFromChromeWebStore(ctx context.Context, reqBody *CreateChromeWebStoreExtensionRequest) (*EmptyDataResponse, *Response, error)
- func (s *ResourcesServiceOp) CreateExtensionFromURL(ctx context.Context, reqBody *CreateExtensionFromURLRequest) (*EmptyDataResponse, *Response, error)
- func (s *ResourcesServiceOp) CreateProfileTemplate(ctx context.Context, reqBody *CreateProfileTemplateRequest) (*CreateAndUploadObjectResponse, *Response, error)
- func (s *ResourcesServiceOp) Delete(ctx context.Context, resourceID string, permanently bool) (*EmptyDataResponse, *Response, error)
- func (s *ResourcesServiceOp) DisableExtensionForProfiles(ctx context.Context, resourceID string, reqBody *SetResourceProfilesRequest) (*StringDataResponse, *Response, error)
- func (s *ResourcesServiceOp) Download(ctx context.Context, resourceID string) (*DownloadResourceResponse, *Response, error)
- func (s *ResourcesServiceOp) EnableExtensionForProfiles(ctx context.Context, resourceID string, reqBody *SetResourceProfilesRequest) (*StringDataResponse, *Response, error)
- func (s *ResourcesServiceOp) GetMeta(ctx context.Context, resourceID string) (*ResourceMetaResponse, *Response, error)
- func (s *ResourcesServiceOp) ListExtensions(ctx context.Context, opts *ListResourceMetasOptions) (*ResourceMetasResponse, *Response, error)
- func (s *ResourcesServiceOp) ListMetas(ctx context.Context, opts *ListResourceMetasOptions) (*ResourceMetasResponse, *Response, error)
- func (s *ResourcesServiceOp) ListProfileTemplates(ctx context.Context, opts *ListResourceMetasOptions) (*ResourceMetasResponse, *Response, error)
- func (s *ResourcesServiceOp) ListTypes(ctx context.Context) (*ResourceTypesResponse, *Response, error)
- func (s *ResourcesServiceOp) LocalToCloud(ctx context.Context, reqBody *LocalToCloudObjectRequest) (*CreateAndUploadObjectResponse, *Response, error)
- func (s *ResourcesServiceOp) ObjectProfileUsages(ctx context.Context, objectID string) (*ObjectProfileUsagesResponse, *Response, error)
- func (s *ResourcesServiceOp) ProfileExtensionUsages(ctx context.Context, profileID string) (*ProfileObjectUsagesResponse, *Response, error)
- func (s *ResourcesServiceOp) ProfileObjectUsages(ctx context.Context, reqBody *ProfileObjectUsagesRequest) (*ProfileObjectUsagesResponse, *Response, error)
- func (s *ResourcesServiceOp) Restore(ctx context.Context, resourceID string) (*EmptyDataResponse, *Response, error)
- func (s *ResourcesServiceOp) Upload(ctx context.Context, reqBody *UploadObjectRequest) (*CreateAndUploadObjectResponse, *Response, error)
- func (s *ResourcesServiceOp) UploadExtension(ctx context.Context, reqBody *UploadExtensionRequest) (*CreateAndUploadObjectResponse, *Response, error)
- type Response
- type RestoreProfilesRequest
- type RetryOptions
- type SaveQuickProfileItem
- type SaveQuickProfileRequest
- type ScreenFingerprint
- type SearchProfilesData
- type SearchProfilesRequest
- type SearchProfilesResponse
- type SearchTagsData
- type SearchTagsRequest
- type SearchTagsResponse
- type SeedProfileCookiesOptions
- type SeedProfileCookiesResult
- type SetResourceProfilesRequest
- type StartProfileAutomationByNameOptions
- type StartProfileByNameOptions
- type StartProfileOptions
- type StartProfileResponse
- type StartQuickProfileRequest
- type StartQuickProfileResponse
- type StartedProfileAutomationWorkflowResult
- type StartedProfileData
- type StartedProfileWorkflowResult
- type Status
- type StopAllProfilesOptions
- type StopProfileByNameOptions
- type StoppedProfileWorkflowResult
- type Storage
- type StringDataResponse
- type Tag
- type TagsData
- type TagsResponse
- type TagsService
- type TagsServiceOp
- func (s *TagsServiceOp) AssignToProfiles(ctx context.Context, reqBody *AssignTagsRequest) (*EmptyDataResponse, *Response, error)
- func (s *TagsServiceOp) Create(ctx context.Context, reqBody *CreateTagsRequest) (*TagsResponse, *Response, error)
- func (s *TagsServiceOp) Remove(ctx context.Context, reqBody *RemoveTagsRequest) (*EmptyDataResponse, *Response, error)
- func (s *TagsServiceOp) Search(ctx context.Context, reqBody *SearchTagsRequest) (*SearchTagsResponse, *Response, error)
- func (s *TagsServiceOp) Update(ctx context.Context, reqBody *UpdateTagsRequest) (*TagsResponse, *Response, error)
- type TimeRangeFilter
- type TimezoneFingerprint
- type TransfersService
- type TransfersServiceOp
- func (s *TransfersServiceOp) Export(ctx context.Context, profileID string) (*ExportProfileResponse, *Response, error)
- func (s *TransfersServiceOp) ExportStatus(ctx context.Context, exportID string) (*ExportStatusResponse, *Response, error)
- func (s *TransfersServiceOp) ExportStatuses(ctx context.Context) (*ExportStatusesResponse, *Response, error)
- func (s *TransfersServiceOp) Import(ctx context.Context, reqBody *ImportProfileRequest) (*ImportProfileResponse, *Response, error)
- func (s *TransfersServiceOp) ImportStatus(ctx context.Context, importID string) (*ImportStatusResponse, *Response, error)
- func (s *TransfersServiceOp) ImportStatuses(ctx context.Context) (*ImportStatusesResponse, *Response, error)
- func (s *TransfersServiceOp) WaitForExportDone(ctx context.Context, exportID string, opts PollOptions) (*ExportStatusResponse, *Response, error)
- func (s *TransfersServiceOp) WaitForImportDone(ctx context.Context, importID string, opts PollOptions) (*ImportStatusResponse, *Response, error)
- type TransportError
- type UpdateCookiesMetadataRequest
- type UpdateFolderRequest
- type UpdateProfileRequest
- type UpdateTagItem
- type UpdateTagsRequest
- type UploadExtensionRequest
- type UploadObjectRequest
- type ValidateProxyRequest
- type ValidateProxyResponse
- type VerifiedProfileWorkflowResult
- type WebRTCFingerprint
- type WorkflowService
- type WorkflowServiceOp
- func (s *WorkflowServiceOp) CreateCloudProfile(ctx context.Context, reqBody *CreateProfileRequest, ...) (*CreatedProfilesWorkflowResult, error)
- func (s *WorkflowServiceOp) CreateLocalProfile(ctx context.Context, reqBody *CreateProfileRequest, ...) (*CreatedProfilesWorkflowResult, error)
- func (s *WorkflowServiceOp) CreateProfilesAndVerify(ctx context.Context, reqBody *CreateProfileRequest, ...) (*CreatedProfilesWorkflowResult, error)
- func (s *WorkflowServiceOp) EnableExtensionForProfileByName(ctx context.Context, profileName, extensionID string, ...) (*EnabledExtensionWorkflowResult, error)
- func (s *WorkflowServiceOp) EnableExtensionForProfilesByName(ctx context.Context, profileNames []string, extensionID string, ...) (*BatchResult[EnabledExtensionWorkflowResult], error)
- func (s *WorkflowServiceOp) ExportProfileByNameToFolder(ctx context.Context, profileName string, ...) (*ExportedProfileWorkflowResult, error)
- func (s *WorkflowServiceOp) ExportProfilesByNameToFolder(ctx context.Context, profileNames []string, ...) (*BatchResult[ExportedProfileWorkflowResult], error)
- func (s *WorkflowServiceOp) FindProfileByNameVerified(ctx context.Context, profileName string, opts FindProfileByNameVerifiedOptions) (*VerifiedProfileWorkflowResult, error)
- func (s *WorkflowServiceOp) GenerateProfileProxyByName(ctx context.Context, profileName string, ...) (*GeneratedProfileProxyWorkflowResult, error)
- func (s *WorkflowServiceOp) ImportProfileAndVerify(ctx context.Context, reqBody *ImportProfileRequest, ...) (*ImportedProfileWorkflowResult, error)
- func (s *WorkflowServiceOp) StartProfileAutomationByName(ctx context.Context, profileName string, ...) (*StartedProfileAutomationWorkflowResult, error)
- func (s *WorkflowServiceOp) StartProfileByName(ctx context.Context, profileName string, opts StartProfileByNameOptions) (*StartedProfileWorkflowResult, error)
- func (s *WorkflowServiceOp) StartProfilesByName(ctx context.Context, profileNames []string, opts StartProfileByNameOptions) (*BatchResult[StartedProfileWorkflowResult], error)
- func (s *WorkflowServiceOp) StopProfileByName(ctx context.Context, profileName string, opts StopProfileByNameOptions) (*StoppedProfileWorkflowResult, error)
- func (s *WorkflowServiceOp) StopProfilesByName(ctx context.Context, profileNames []string, opts StopProfileByNameOptions) (*BatchResult[StoppedProfileWorkflowResult], error)
Examples ¶
Constants ¶
const ( EnvBaseURL = "MLX_BASE_URL" EnvLauncherURL = "MLX_LAUNCHER_URL" EnvCookiesURL = "MLX_COOKIES_URL" EnvProxyURL = "MLX_PROXY_URL" EnvRunE2E = "MLX_RUN_E2E" EnvE2EFolderID = "MLX_E2E_FOLDER_ID" EnvE2EProfileID = "MLX_E2E_PROFILE_ID" )
const ( ResourceTypeProfileTemplates = "7e46e7f9-15d4-41b6-83b9-a652336793ec" ResourceTypeProxyConfiguration = "3c1a0080-5282-436b-885c-ab27d5004aa8" ResourceTypeExtensions = "6811b909-2e4b-45db-ab62-f14f515523cf" ResourceTypeCookies = "58268a18-02b8-4d2d-ac59-9cc166ea4064" ResourceTypePasswords = "bb80e9b9-b2bb-43b5-968b-c2ea9b509d7a" ResourceTypeAutomationScripts = "8dfc6cec-4aad-41f0-ac87-ff44a4be0b3a" ResourceTypeLaunchParameterTemplates = "42d592bc-df3a-47b5-8d50-4b338df6ade2" )
const (
// EnvToken is the environment variable that stores the long-lived MultiloginX token.
EnvToken = "MLX_TOKEN"
)
Variables ¶
var ( ErrMissingToken = errors.New("mlx token is required") ErrNilContext = errors.New("context must not be nil") ErrInvalidBaseURL = errors.New("invalid base url") ErrInvalidLauncherURL = errors.New("invalid launcher url") ErrProfileNotFound = errors.New("profile not found") ErrProfileAmbiguous = errors.New("profile lookup matched multiple profiles") )
var DefaultCheckTargets = []string{
"https://www.google.com",
"https://www.facebook.com",
"https://medium.com",
}
DefaultCheckTargets are browser-common sites used to measure proxy health.
Functions ¶
func ChromeWebStoreExtensionDownloadURL ¶
ChromeWebStoreExtensionDownloadURL converts a Chrome Web Store extension ID into the CRX download URL expected by the launcher extension creation endpoint.
func DefaultArchiveFolderName ¶
DefaultArchiveFolderName returns a safe directory name for a profile archive.
Example ¶
package main
import (
"fmt"
"strings"
"time"
mlx "github.com/minskyagenda0708-cmd/mlx-go-sdk"
)
func main() {
name := mlx.DefaultArchiveFolderName(`John: Doe/QA`, "profile-1", time.Date(2026, 4, 19, 12, 0, 0, 0, time.UTC))
fmt.Println(strings.Contains(name, ":"), strings.Contains(name, "/"))
}
Output: false false
func IsRateLimitedError ¶
IsRateLimitedError reports whether the error represents an MLX/API rate limit condition.
func IsRetryableError ¶
IsRetryableError reports whether the given error is safe to retry automatically.
func IsTemporaryError ¶
IsTemporaryError reports whether the given error is likely transient.
func RetryAfter ¶
RetryAfter returns the recommended delay extracted from a typed SDK error when present.
Types ¶
type AllProfileStatusesData ¶
type AllProfileStatusesData struct {
ActiveCounter LauncherActiveCounter `json:"active_counter"`
States map[string]ProfileRuntimeStatus `json:"states"`
}
AllProfileStatusesData wraps all launcher states.
type AllProfileStatusesResponse ¶
type AllProfileStatusesResponse struct {
Status Status `json:"status"`
Data AllProfileStatusesData `json:"data"`
}
AllProfileStatusesResponse contains all profile runtime states.
func (*AllProfileStatusesResponse) GetStatus ¶
func (r *AllProfileStatusesResponse) GetStatus() Status
type ArchiveManager ¶
type ArchiveManager interface {
OrganizeExport(string, string, string) (*OrganizedArchive, error)
ExportProfileToFolder(context.Context, string, ExportProfileToFolderOptions) (*ManagedExportResult, error)
}
ArchiveManager provides filesystem-oriented helpers for export flows.
type ArchiveManagerOp ¶
type ArchiveManagerOp struct {
// contains filtered or unexported fields
}
ArchiveManagerOp is the concrete archive manager implementation.
func (*ArchiveManagerOp) ExportProfileToFolder ¶
func (m *ArchiveManagerOp) ExportProfileToFolder(ctx context.Context, profileID string, opts ExportProfileToFolderOptions) (*ManagedExportResult, error)
ExportProfileToFolder exports a profile, waits for completion, and then organizes the resulting zip on disk.
func (*ArchiveManagerOp) OrganizeExport ¶
func (m *ArchiveManagerOp) OrganizeExport(exportPath, rootDir, folderName string) (*OrganizedArchive, error)
OrganizeExport moves an exported zip into a dedicated folder without renaming the zip file itself.
type ArgError ¶
type ArgError struct {
// contains filtered or unexported fields
}
ArgError describes an invalid input argument.
func NewArgError ¶
type AssignTagsRequest ¶
type AssignTagsRequest struct {
TagIDs []string `json:"tag_ids"`
ProfileIDs []string `json:"profile_ids"`
}
AssignTagsRequest assigns tags to profiles.
type AutomationEndpointError ¶
type AutomationEndpointError struct {
RequestedAutomation AutomationType
LauncherAutomation AutomationType
Port string
Message string
Err error
}
AutomationEndpointError describes an unusable launcher automation endpoint.
func (*AutomationEndpointError) Error ¶
func (e *AutomationEndpointError) Error() string
func (*AutomationEndpointError) Unwrap ¶
func (e *AutomationEndpointError) Unwrap() error
type AutomationType ¶
type AutomationType string
AutomationType describes the launcher automation mode.
const ( AutomationSelenium AutomationType = "selenium" AutomationPlaywright AutomationType = "playwright" AutomationPuppeteer AutomationType = "puppeteer" AutomationRod AutomationType = "rod" )
type BatchItemResult ¶
BatchItemResult stores the per-profile outcome of a batch workflow helper.
type BatchProfileOperationError ¶
type BatchProfileOperationError struct {
Operation string
Failures []ProfileBatchFailure
}
BatchProfileOperationError aggregates failures from a multi-profile helper.
func (*BatchProfileOperationError) Error ¶
func (e *BatchProfileOperationError) Error() string
func (*BatchProfileOperationError) Unwrap ¶
func (e *BatchProfileOperationError) Unwrap() []error
Unwrap exposes all underlying item errors for errors.Is/errors.As checks.
type BatchResult ¶
type BatchResult[T any] struct { Summary BatchSummary Items []BatchItemResult[T] }
BatchResult stores ordered per-profile outcomes together with a summary.
func (*BatchResult[T]) Failures ¶
func (r *BatchResult[T]) Failures() []ProfileBatchFailure
Failures returns the failed profile entries from the batch result.
type BatchSummary ¶
BatchSummary reports how many profile items succeeded or failed.
type BrowserCookie ¶
type BrowserCookie struct {
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
Domain string `json:"domain,omitempty"`
Path string `json:"path,omitempty"`
Secure bool `json:"secure,omitempty"`
HTTPOnly bool `json:"httpOnly,omitempty"`
Session bool `json:"session,omitempty"`
HostOnly bool `json:"hostOnly,omitempty"`
StoreID string `json:"storeId,omitempty"`
SameSite string `json:"sameSite,omitempty"`
SameParty bool `json:"sameParty,omitempty"`
SourcePort int `json:"sourcePort,omitempty"`
SourceScheme string `json:"sourceScheme,omitempty"`
ExpirationDate int64 `json:"expirationDate,omitempty"`
Size int `json:"size,omitempty"`
}
BrowserCookie describes an individual browser cookie.
type Client ¶
type Client struct {
Profiles ProfilesService
Launcher LauncherService
Proxies ProxyService
Folders FoldersService
Transfers TransfersService
Archives ArchiveManager
Cookies CookiesService
Resources ResourcesService
Workflows WorkflowService
Tags TagsService
// contains filtered or unexported fields
}
Client is the main entry point for the MultiloginX SDK.
func NewFromEnv ¶
NewFromEnv creates a client using the `MLX_TOKEN` environment variable.
Example (ProductionClient) ¶
package main
import (
"fmt"
"os"
"time"
mlx "github.com/minskyagenda0708-cmd/mlx-go-sdk"
)
func main() {
_ = os.Setenv(mlx.EnvToken, "test-token")
_ = os.Setenv(mlx.EnvBaseURL, "https://api.example.test")
_ = os.Setenv(mlx.EnvLauncherURL, "https://launcher.example.test:45001")
_ = os.Setenv(mlx.EnvCookiesURL, "https://cookies.example.test")
_ = os.Setenv(mlx.EnvProxyURL, "https://proxy.example.test")
defer os.Unsetenv(mlx.EnvToken)
defer os.Unsetenv(mlx.EnvBaseURL)
defer os.Unsetenv(mlx.EnvLauncherURL)
defer os.Unsetenv(mlx.EnvCookiesURL)
defer os.Unsetenv(mlx.EnvProxyURL)
client, err := mlx.NewFromEnv(
mlx.WithTimeout(30*time.Second),
mlx.WithRetry(mlx.RetryOptions{
MaxAttempts: 4,
InitialInterval: 500 * time.Millisecond,
MaxInterval: 2 * time.Second,
Multiplier: 2,
Jitter: 0,
}),
mlx.WithUserAgent("acme-mlx-cli/1.0"),
)
if err != nil {
fmt.Println("error:", err)
return
}
fmt.Println(client != nil)
}
Output: true
func (*Client) PatchProfileForProxy ¶
func (c *Client) PatchProfileForProxy(ctx context.Context, profileID string, proxy *Proxy) (*EmptyDataResponse, *Response, error)
PatchProfileForProxy installs the given proxy into a profile and automatically adjusts language, locale, timezone, screen, and browser UI language to match the proxy country. Screen resolution defaults to 1920×1080 (FHD).
Use PatchProfileForProxyWithOptions for finer control over screen bounds.
func (*Client) PatchProfileForProxyWithOptions ¶
func (c *Client) PatchProfileForProxyWithOptions(ctx context.Context, profileID string, proxy *Proxy, opts PatchProfileForProxyOptions) (*EmptyDataResponse, *Response, error)
PatchProfileForProxyWithOptions is the configurable variant of PatchProfileForProxy. It accepts PatchProfileForProxyOptions to control the range of screen resolutions.
type CloneProfileRequest ¶
CloneProfileRequest clones a profile.
type CommandParam ¶
type CommandParam struct {
Flag string `json:"flag,omitempty"`
Value string `json:"value,omitempty"`
}
CommandParam describes a single command-line parameter.
type CommandParams ¶
type CommandParams struct {
Params []CommandParam `json:"params,omitempty"`
}
CommandParams wraps browser command-line parameters.
type CookieBundle ¶
type CookieBundle struct {
ID int `json:"id"`
CreatedAt string `json:"created_at"`
Data []BrowserCookie `json:"data"`
}
CookieBundle groups a generated cookie set.
type CookieExportData ¶
type CookieExportData struct {
Cookies string `json:"cookies"`
ProfileID string `json:"profile_id"`
Timestamp int64 `json:"timestamp"`
}
CookieExportData contains launcher cookie export output.
type CookieExportRequest ¶
type CookieExportRequest struct {
ProfileID string `json:"profile_id"`
FolderID string `json:"folder_id,omitempty"`
}
CookieExportRequest exports profile cookies from the launcher.
type CookieExportResponse ¶
type CookieExportResponse struct {
Status Status `json:"status"`
Data CookieExportData `json:"data"`
}
CookieExportResponse contains exported cookie JSON.
func (*CookieExportResponse) GetStatus ¶
func (r *CookieExportResponse) GetStatus() Status
type CookieImportRequest ¶
type CookieImportRequest struct {
ProfileID string `json:"profile_id"`
FolderID string `json:"folder_id,omitempty"`
ImportAdvancedCookies bool `json:"import_advanced_cookies"`
Cookies []BrowserCookie `json:"-"`
StrictMode bool `json:"-"`
}
CookieImportRequest imports either advanced pre-made cookies or explicit cookie JSON into a profile.
func (CookieImportRequest) MarshalJSON ¶
func (r CookieImportRequest) MarshalJSON() ([]byte, error)
MarshalJSON converts cookie arrays into the quoted JSON string format expected by the launcher endpoint.
type CookieListData ¶
type CookieListData struct {
Cookies []CookieBundle `json:"cookies"`
}
CookieListData wraps cookie bundles.
type CookieListResponse ¶
type CookieListResponse struct {
Status Status `json:"status"`
Data CookieListData `json:"data"`
}
CookieListResponse contains pre-made cookie bundles for a profile.
func (*CookieListResponse) GetStatus ¶
func (r *CookieListResponse) GetStatus() Status
type CookieWebsite ¶
CookieWebsite describes an available pre-made cookie target.
type CookieWebsitesResponse ¶
type CookieWebsitesResponse struct {
Status Status `json:"status"`
Data []CookieWebsite `json:"data"`
}
CookieWebsitesResponse contains target website options.
func (*CookieWebsitesResponse) GetStatus ¶
func (r *CookieWebsitesResponse) GetStatus() Status
type CookiesMetadataData ¶
type CookiesMetadataData struct {
ProfileID string `json:"profile_id"`
}
CookiesMetadataData contains metadata creation output.
type CookiesMetadataResponse ¶
type CookiesMetadataResponse struct {
Status Status `json:"status"`
Data CookiesMetadataData `json:"data"`
}
CookiesMetadataResponse returns the profile id affected by metadata creation.
func (*CookiesMetadataResponse) GetStatus ¶
func (r *CookiesMetadataResponse) GetStatus() Status
type CookiesService ¶
type CookiesService interface {
ListWebsites(context.Context) (*CookieWebsitesResponse, *Response, error)
CreateMetadata(context.Context, *CreateCookiesMetadataRequest) (*CookiesMetadataResponse, *Response, error)
UpdateMetadata(context.Context, *UpdateCookiesMetadataRequest) (*EmptyDataResponse, *Response, error)
List(context.Context, string) (*CookieListResponse, *Response, error)
Import(context.Context, *CookieImportRequest) (*EmptyDataResponse, *Response, error)
Export(context.Context, *CookieExportRequest) (*CookieExportResponse, *Response, error)
SeedProfileCookies(context.Context, SeedProfileCookiesOptions) (*SeedProfileCookiesResult, error)
}
CookiesService manages pre-made cookies metadata and launcher cookie import/export flows.
type CookiesServiceOp ¶
type CookiesServiceOp struct {
// contains filtered or unexported fields
}
CookiesServiceOp is the concrete cookie service.
func (*CookiesServiceOp) CreateMetadata ¶
func (s *CookiesServiceOp) CreateMetadata(ctx context.Context, reqBody *CreateCookiesMetadataRequest) (*CookiesMetadataResponse, *Response, error)
func (*CookiesServiceOp) Export ¶
func (s *CookiesServiceOp) Export(ctx context.Context, reqBody *CookieExportRequest) (*CookieExportResponse, *Response, error)
func (*CookiesServiceOp) Import ¶
func (s *CookiesServiceOp) Import(ctx context.Context, reqBody *CookieImportRequest) (*EmptyDataResponse, *Response, error)
func (*CookiesServiceOp) List ¶
func (s *CookiesServiceOp) List(ctx context.Context, profileID string) (*CookieListResponse, *Response, error)
func (*CookiesServiceOp) ListWebsites ¶
func (s *CookiesServiceOp) ListWebsites(ctx context.Context) (*CookieWebsitesResponse, *Response, error)
func (*CookiesServiceOp) SeedProfileCookies ¶
func (s *CookiesServiceOp) SeedProfileCookies(ctx context.Context, opts SeedProfileCookiesOptions) (*SeedProfileCookiesResult, error)
SeedProfileCookies creates or updates pre-made cookies metadata, fetches generated cookies, and imports them into the profile.
func (*CookiesServiceOp) UpdateMetadata ¶
func (s *CookiesServiceOp) UpdateMetadata(ctx context.Context, reqBody *UpdateCookiesMetadataRequest) (*EmptyDataResponse, *Response, error)
type CreateAndUploadObjectData ¶
type CreateAndUploadObjectData struct {
MetaID string `json:"meta_id"`
}
CreateAndUploadObjectData contains the created resource id.
type CreateAndUploadObjectRequest ¶
type CreateAndUploadObjectRequest struct {
ObjectName string `json:"object_name"`
ObjectExtension string `json:"object_extension"`
ObjectTypeID string `json:"object_type_id"`
ObjectBody string `json:"object_body"`
ObjectMeta string `json:"object_meta,omitempty"`
Encrypt *bool `json:"encrypt,omitempty"`
}
CreateAndUploadObjectRequest creates a new launcher-backed object from body content.
type CreateAndUploadObjectResponse ¶
type CreateAndUploadObjectResponse struct {
Status Status `json:"status"`
Data CreateAndUploadObjectData `json:"data"`
}
CreateAndUploadObjectResponse returns the created resource meta id.
func (*CreateAndUploadObjectResponse) GetStatus ¶
func (r *CreateAndUploadObjectResponse) GetStatus() Status
type CreateChromeWebStoreExtensionRequest ¶
type CreateChromeWebStoreExtensionRequest struct {
ExtensionID string
BrowserType string
StorageType string
}
CreateChromeWebStoreExtensionRequest creates an extension from a Chrome Web Store ID.
type CreateCookiesMetadataRequest ¶
type CreateCookiesMetadataRequest struct {
ProfileID string `json:"profile_id"`
TargetWebsite string `json:"target_website"`
StrictMode bool `json:"-"`
}
CreateCookiesMetadataRequest binds a profile to a pre-made cookie target website.
type CreateExtensionFromURLRequest ¶
type CreateExtensionFromURLRequest struct {
URL string `json:"url"`
BrowserType string `json:"browser_type"`
StorageType string `json:"storage_type"`
}
CreateExtensionFromURLRequest materializes an extension object from a downloadable URL.
StorageType defaults to "cloud" because cloud-backed extension references are the safest choice for both cloud and local profiles.
type CreateFolderRequest ¶
type CreateFolderRequest struct {
Name string `json:"name"`
Comment string `json:"comment,omitempty"`
}
CreateFolderRequest creates a folder.
type CreateFolderResponse ¶
type CreateFolderResponse struct {
Status Status `json:"status"`
Data CreatedFolderData `json:"data"`
}
CreateFolderResponse contains the created folder ID.
func (*CreateFolderResponse) GetStatus ¶
func (r *CreateFolderResponse) GetStatus() Status
type CreateProfileRequest ¶
type CreateProfileRequest struct {
Name string `json:"name"`
BrowserType string `json:"browser_type"`
FolderID string `json:"folder_id"`
OSType string `json:"os_type"`
CoreVersion int `json:"core_version,omitempty"`
CoreMinorVersion int `json:"core_minor_version,omitempty"`
AutoUpdateCore *bool `json:"auto_update_core,omitempty"`
Times int `json:"times,omitempty"`
Notes string `json:"notes,omitempty"`
Parameters *ProfileParameters `json:"parameters,omitempty"`
Tags []string `json:"tags,omitempty"`
}
CreateProfileRequest creates one or more profiles.
type CreateProfileResponse ¶
type CreateProfileResponse struct {
Status Status `json:"status"`
Data CreatedProfileIDs `json:"data"`
}
CreateProfileResponse contains created profile IDs.
func (*CreateProfileResponse) GetStatus ¶
func (r *CreateProfileResponse) GetStatus() Status
type CreateProfileTemplateRequest ¶
type CreateProfileTemplateRequest struct {
Name string
Extension string
Body string
Meta string
Encrypt *bool
}
CreateProfileTemplateRequest creates a profile template resource.
type CreateProfilesAndVerifyOptions ¶
type CreateProfilesAndVerifyOptions struct {
PollOptions PollOptions
}
CreateProfilesAndVerifyOptions controls post-create verification polling.
type CreateTagItem ¶
CreateTagItem is a single tag to create.
type CreateTagsRequest ¶
type CreateTagsRequest struct {
Tags []CreateTagItem `json:"tags"`
}
CreateTagsRequest creates tags.
type CreatedFolderData ¶
type CreatedFolderData struct {
ID string `json:"id"`
}
CreatedFolderData wraps the created folder ID.
type CreatedProfileIDs ¶
type CreatedProfileIDs struct {
IDs []string `json:"ids"`
}
CreatedProfileIDs wraps returned profile IDs.
type CreatedProfilesWorkflowResult ¶
type CreatedProfilesWorkflowResult struct {
CreateResponse *CreateProfileResponse
Profiles []ProfileMeta
}
CreatedProfilesWorkflowResult contains created IDs and verified profile metas.
type DeleteFoldersRequest ¶
type DeleteFoldersRequest struct {
IDs []string `json:"ids"`
}
DeleteFoldersRequest removes folders.
type DeleteProfilesRequest ¶
type DeleteProfilesRequest struct {
IDs []string `json:"ids"`
Permanently bool `json:"permanently"`
}
DeleteProfilesRequest removes profiles.
type DownloadResourceResponse ¶
DownloadResourceResponse contains the downloaded path materialized by the launcher.
func (*DownloadResourceResponse) GetStatus ¶
func (r *DownloadResourceResponse) GetStatus() Status
type EmptyDataResponse ¶
EmptyDataResponse is used by endpoints returning null data.
func (*EmptyDataResponse) GetStatus ¶
func (r *EmptyDataResponse) GetStatus() Status
type EnableExtensionForProfileByNameOptions ¶
type EnableExtensionForProfileByNameOptions struct {
FindOptions *FindProfileOptions
PollOptions PollOptions
RequireProfileUsageRead bool
}
EnableExtensionForProfileByNameOptions controls lookup and verification for extension attachment.
type EnabledExtensionWorkflowResult ¶
type EnabledExtensionWorkflowResult struct {
Profile *Profile
EnableResponse *StringDataResponse
ObjectUsages *ObjectProfileUsagesResponse
ProfileUsages *ProfileObjectUsagesResponse
ProfileUsageErr error
}
EnabledExtensionWorkflowResult contains the verified extension attachment state.
type EnsureHealthyProfileProxyOptions ¶
type EnsureHealthyProfileProxyOptions struct {
EnsureHealthyProxyOptions
PreferSOCKS5 bool
SaveTraffic bool
}
EnsureHealthyProfileProxyOptions configures the service-level continuity check.
type EnsureHealthyProxyOptions ¶
type EnsureHealthyProxyOptions struct {
ThresholdMs int // preferred max latency; default 2000
HardCapMs int // escalation cap; default 3000
CandidatesPerRound int // proxies generated per geo round; default 5
Checker ProxyChecker // default NewHTTPProxyChecker(HTTPProxyCheckerConfig{})
}
EnsureHealthyProxyOptions tunes proxy-continuity behavior.
type ErrorClass ¶
type ErrorClass string
ErrorClass describes a typed SDK error category.
const ( ErrorClassUnknown ErrorClass = "unknown" ErrorClassCanceled ErrorClass = "canceled" ErrorClassTimeout ErrorClass = "timeout" ErrorClassNetwork ErrorClass = "network" ErrorClassRateLimited ErrorClass = "rate_limited" ErrorClassForbidden ErrorClass = "forbidden" ErrorClassNotFound ErrorClass = "not_found" ErrorClassConflict ErrorClass = "conflict" ErrorClassInvalidRequest ErrorClass = "invalid_request" ErrorClassServer ErrorClass = "server" )
func ClassifyError ¶
func ClassifyError(err error) ErrorClass
ClassifyError returns a typed classification for SDK errors.
type ErrorResponse ¶
type ErrorResponse struct {
Response *http.Response
Status Status `json:"status"`
Body []byte `json:"-"`
}
ErrorResponse represents a MultiloginX API error.
func (*ErrorResponse) Class ¶
func (e *ErrorResponse) Class() ErrorClass
Class returns the typed error category for the API response.
func (*ErrorResponse) Error ¶
func (e *ErrorResponse) Error() string
func (*ErrorResponse) IsRateLimited ¶
func (e *ErrorResponse) IsRateLimited() bool
IsRateLimited reports whether the API error is a rate limit response.
func (*ErrorResponse) RetryAfter ¶
func (e *ErrorResponse) RetryAfter() time.Duration
RetryAfter returns the parsed Retry-After header when present.
func (*ErrorResponse) Retryable ¶
func (e *ErrorResponse) Retryable() bool
Retryable reports whether retry/backoff helpers should retry the API error.
func (*ErrorResponse) StatusCode ¶
func (e *ErrorResponse) StatusCode() int
StatusCode returns the best available HTTP/status code for the response.
func (*ErrorResponse) Temporary ¶
func (e *ErrorResponse) Temporary() bool
Temporary reports whether the API error is likely transient.
type ExportJobState ¶
type ExportJobState struct {
ExportID string `json:"export_id"`
ExportPath string `json:"export_path"`
ProfileID string `json:"profile_id"`
Status string `json:"status"`
Message string `json:"message"`
Timestamp int64 `json:"timestamp"`
}
ExportJobState describes an export job.
func (ExportJobState) ArchivePath ¶
func (j ExportJobState) ArchivePath() string
ArchivePath returns the best importable archive path for an export job.
Live Multilogin X responses are inconsistent: - export start responses often return a `.zip` path - export done responses may return the same path without the `.zip` suffix
Import expects the concrete archive file path, so when the launcher returns an extensionless export path this method normalizes it to the expected `.zip` path.
type ExportProfileByNameToFolderOptions ¶
type ExportProfileByNameToFolderOptions struct {
FindOptions *FindProfileOptions
ExportOptions ExportProfileToFolderOptions
StopBeforeExport bool
IgnoreStopNotReady bool
}
ExportProfileByNameToFolderOptions controls the lookup and export workflow behavior.
type ExportProfileResponse ¶
type ExportProfileResponse struct {
Status Status `json:"status"`
Data ExportJobState `json:"data"`
}
ExportProfileResponse contains export job details.
func (*ExportProfileResponse) GetStatus ¶
func (r *ExportProfileResponse) GetStatus() Status
type ExportProfileToFolderOptions ¶
type ExportProfileToFolderOptions struct {
RootDir string
FolderName string
ProfileName string
PollInterval time.Duration
WaitTimeout time.Duration
}
ExportProfileToFolderOptions controls how an exported archive is organized on disk.
type ExportStatusResponse ¶
type ExportStatusResponse struct {
Status Status `json:"status"`
Data ExportJobState `json:"data"`
}
ExportStatusResponse contains a single export job status.
func (*ExportStatusResponse) GetStatus ¶
func (r *ExportStatusResponse) GetStatus() Status
type ExportStatusesData ¶
type ExportStatusesData struct {
Statuses []ExportJobState `json:"statuses"`
}
ExportStatusesData wraps export jobs.
type ExportStatusesResponse ¶
type ExportStatusesResponse struct {
Status Status `json:"status"`
Data ExportStatusesData `json:"data"`
}
ExportStatusesResponse contains all export jobs.
func (*ExportStatusesResponse) GetStatus ¶
func (r *ExportStatusesResponse) GetStatus() Status
type ExportedProfileWorkflowResult ¶
type ExportedProfileWorkflowResult struct {
Profile *Profile
Export *ManagedExportResult
}
ExportedProfileWorkflowResult contains the resolved profile and managed export result.
type FindProfileByNameVerifiedOptions ¶
type FindProfileByNameVerifiedOptions struct {
FindOptions *FindProfileOptions
}
FindProfileByNameVerifiedOptions controls exact-name lookup verification.
type FindProfileOptions ¶
type FindProfileOptions struct {
IsRemoved bool
StorageType string
FolderID string
BrowserType string
OSType string
Limit int
Tags []string
}
FindProfileOptions narrows convenience profile lookups.
type Fingerprint ¶
type Fingerprint struct {
Localization *LocalizationFingerprint `json:"localization,omitempty"`
Timezone *TimezoneFingerprint `json:"timezone,omitempty"`
Graphic *GraphicFingerprint `json:"graphic,omitempty"`
WebRTC *WebRTCFingerprint `json:"webrtc,omitempty"`
MediaDevices *MediaDevicesFingerprint `json:"media_devices,omitempty"`
Screen *ScreenFingerprint `json:"screen,omitempty"`
Geolocation *GeolocationFingerprint `json:"geolocation,omitempty"`
Ports []int `json:"ports,omitempty"`
Fonts []string `json:"fonts,omitempty"`
CMDParams *CommandParams `json:"cmd_params,omitempty"`
}
Fingerprint contains typed browser fingerprint settings.
type Folder ¶
type Folder struct {
FolderID string `json:"folder_id"`
Name string `json:"name"`
Comment string `json:"comment"`
ProfilesCount int `json:"profiles_count"`
CreatedAt string `json:"created_at"`
}
Folder describes a workspace folder.
type FoldersService ¶
type FoldersService interface {
List(context.Context) (*ListFoldersResponse, *Response, error)
Create(context.Context, *CreateFolderRequest) (*CreateFolderResponse, *Response, error)
Update(context.Context, *UpdateFolderRequest) (*EmptyDataResponse, *Response, error)
Delete(context.Context, *DeleteFoldersRequest) (*EmptyDataResponse, *Response, error)
}
FoldersService manages workspace folders.
type FoldersServiceOp ¶
type FoldersServiceOp struct {
// contains filtered or unexported fields
}
FoldersServiceOp is the concrete folder service.
func (*FoldersServiceOp) Create ¶
func (s *FoldersServiceOp) Create(ctx context.Context, reqBody *CreateFolderRequest) (*CreateFolderResponse, *Response, error)
func (*FoldersServiceOp) Delete ¶
func (s *FoldersServiceOp) Delete(ctx context.Context, reqBody *DeleteFoldersRequest) (*EmptyDataResponse, *Response, error)
func (*FoldersServiceOp) List ¶
func (s *FoldersServiceOp) List(ctx context.Context) (*ListFoldersResponse, *Response, error)
func (*FoldersServiceOp) Update ¶
func (s *FoldersServiceOp) Update(ctx context.Context, reqBody *UpdateFolderRequest) (*EmptyDataResponse, *Response, error)
type GenerateProfileProxyByNameOptions ¶
type GenerateProfileProxyByNameOptions struct {
FindOptions *FindProfileOptions
GenerateOptions GenerateProfileProxyRequest
PatchProfile bool
}
GenerateProfileProxyByNameOptions controls profile lookup, proxy generation, and profile patching.
type GenerateProfileProxyRequest ¶
type GenerateProfileProxyRequest struct {
GenerateProxyRequest
PreferSOCKS5 bool
SaveTraffic bool
}
GenerateProfileProxyRequest generates and adapts an MLX proxy for profile APIs.
type GenerateProfileProxyResult ¶
type GenerateProfileProxyResult struct {
Connection *GeneratedProxyConnection
ProfileProxy *Proxy
Usage *ProxyUsageResponse
}
GenerateProfileProxyResult returns both the parsed connection and profile payload.
type GenerateProxyRequest ¶
type GenerateProxyRequest struct {
Country string `json:"country,omitempty"`
SessionType ProxySessionType `json:"sessionType,omitempty"`
Protocol ProxyProtocol `json:"protocol,omitempty"`
Region string `json:"region,omitempty"`
City string `json:"city,omitempty"`
IPTTL int `json:"IPTTL,omitempty"`
Count int `json:"count,omitempty"`
StrictMode bool `json:"-"`
}
GenerateProxyRequest requests one or more MLX-managed proxy endpoints.
type GenerateProxyResponse ¶
type GenerateProxyResponse struct {
Status int `json:"status"`
Data []string `json:"data"`
Parsed []*GeneratedProxyConnection `json:"-"`
}
GenerateProxyResponse contains generated connection strings and parsed variants.
func (*GenerateProxyResponse) UnmarshalJSON ¶
func (r *GenerateProxyResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON accepts both the documented single-string payload and the live array payload.
type GeneratedProfileProxyWorkflowResult ¶
type GeneratedProfileProxyWorkflowResult struct {
Profile *Profile
Connection *GeneratedProxyConnection
ProfileProxy *Proxy
Usage *ProxyUsageResponse
PatchResponse *EmptyDataResponse
}
GeneratedProfileProxyWorkflowResult contains the resolved profile and generated proxy artifacts.
type GeneratedProxyConnection ¶
type GeneratedProxyConnection struct {
Raw string
Protocol ProxyProtocol
Host string
Port int
Username string
Password string
Country string
Region string
City string
SessionID string
BillingID string
Filter string
RetentionKey string
RetentionSecret string
}
GeneratedProxyConnection is the parsed form of the returned MLX connection string.
func ParseGeneratedProxyConnection ¶
func ParseGeneratedProxyConnection(raw string, protocol ProxyProtocol) (*GeneratedProxyConnection, error)
ParseGeneratedProxyConnection parses one MLX proxy connection string.
type GeolocationFingerprint ¶
type GeolocationFingerprint struct {
Accuracy float64 `json:"accuracy,omitempty"`
Altitude float64 `json:"altitude,omitempty"`
Latitude float64 `json:"latitude,omitempty"`
Longitude float64 `json:"longitude,omitempty"`
}
GeolocationFingerprint contains geolocation values.
type GraphicFingerprint ¶
type GraphicFingerprint struct {
Renderer string `json:"renderer,omitempty"`
Vendor string `json:"vendor,omitempty"`
VendorID string `json:"vendor_id,omitempty"`
DeviceID string `json:"device_id,omitempty"`
}
GraphicFingerprint contains GPU information.
type HTTPProxyChecker ¶
type HTTPProxyChecker struct {
// contains filtered or unexported fields
}
HTTPProxyChecker measures proxy liveness/latency via stdlib net/http + httptrace.
func NewHTTPProxyChecker ¶
func NewHTTPProxyChecker(cfg HTTPProxyCheckerConfig) *HTTPProxyChecker
NewHTTPProxyChecker builds a checker, applying defaults for empty fields.
func (*HTTPProxyChecker) Check ¶
func (c *HTTPProxyChecker) Check(ctx context.Context, p *Proxy) ProxyCheckResult
Check dials each target through the proxy, records TTFB, and returns the best.
type HTTPProxyCheckerConfig ¶
type HTTPProxyCheckerConfig struct {
Targets []string // defaults to DefaultCheckTargets
PerTargetTimeout time.Duration // defaults to 10s
UserAgent string // defaults to a Chrome-like UA
}
HTTPProxyCheckerConfig configures HTTPProxyChecker.
type ImportJobState ¶
type ImportJobState struct {
ExportID string `json:"export_id"`
ImportID string `json:"import_id"`
ImportPath string `json:"import_path"`
ExtractedPath string `json:"extracted_path"`
NewProfileID string `json:"new_profile_id"`
Status string `json:"status"`
Message string `json:"message"`
Timestamp int64 `json:"timestamp"`
}
ImportJobState describes an import job.
type ImportProfileRequest ¶
type ImportProfileRequest struct {
ImportPath string `json:"import_path"`
IsLocal bool `json:"is_local"`
}
ImportProfileRequest imports a profile archive.
type ImportProfileResponse ¶
type ImportProfileResponse struct {
Status Status `json:"status"`
Data ImportJobState `json:"data"`
}
ImportProfileResponse contains import job details.
func (*ImportProfileResponse) GetStatus ¶
func (r *ImportProfileResponse) GetStatus() Status
type ImportProfileWorkflowOptions ¶
type ImportProfileWorkflowOptions struct {
PollOptions PollOptions
}
ImportProfileWorkflowOptions controls import verification.
type ImportStatusResponse ¶
type ImportStatusResponse struct {
Status Status `json:"status"`
Data ImportJobState `json:"data"`
}
ImportStatusResponse contains a single import status.
func (*ImportStatusResponse) GetStatus ¶
func (r *ImportStatusResponse) GetStatus() Status
type ImportStatusesData ¶
type ImportStatusesData struct {
Statuses []ImportJobState `json:"statuses"`
}
ImportStatusesData wraps all import jobs.
type ImportStatusesResponse ¶
type ImportStatusesResponse struct {
Status Status `json:"status"`
Data ImportStatusesData `json:"data"`
}
ImportStatusesResponse contains all import jobs.
func (*ImportStatusesResponse) GetStatus ¶
func (r *ImportStatusesResponse) GetStatus() Status
type ImportedProfileWorkflowResult ¶
type ImportedProfileWorkflowResult struct {
ImportResponse *ImportProfileResponse
ImportStatus *ImportStatusResponse
ProfileMeta *ProfileMeta
}
ImportedProfileWorkflowResult contains verified import artifacts.
type LauncherActiveCounter ¶
type LauncherActiveCounter struct {
Cloud int `json:"cloud"`
Local int `json:"local"`
Quick int `json:"quick"`
}
LauncherActiveCounter reports running profile counts by storage type.
type LauncherHealthData ¶
type LauncherHealthData struct {
Alive bool `json:"alive"`
Env string `json:"env,omitempty"`
Version string `json:"version,omitempty"`
}
LauncherHealthData contains the launcher readiness state.
type LauncherHealthResponse ¶
type LauncherHealthResponse struct {
Status Status `json:"status"`
Data LauncherHealthData `json:"data"`
}
LauncherHealthResponse reports whether the local launcher is reachable.
Multilogin X does not currently expose a dedicated health endpoint in the checked-in Postman collection, so this helper probes `/api/v1/version` as the launcher liveness/readiness check.
func (*LauncherHealthResponse) GetStatus ¶
func (r *LauncherHealthResponse) GetStatus() Status
type LauncherService ¶
type LauncherService interface {
Start(context.Context, string, string, StartProfileOptions) (*StartProfileResponse, *Response, error)
StartQuick(context.Context, *StartQuickProfileRequest) (*StartQuickProfileResponse, *Response, error)
SaveQuick(context.Context, *SaveQuickProfileRequest) (*EmptyDataResponse, *Response, error)
Stop(context.Context, string) (*EmptyDataResponse, *Response, error)
StopAll(context.Context, StopAllProfilesOptions) (*EmptyDataResponse, *Response, error)
Health(context.Context) (*LauncherHealthResponse, *Response, error)
Status(context.Context, string) (*ProfileRuntimeStatusResponse, *Response, error)
WaitForRunning(context.Context, string, PollOptions) (*ProfileRuntimeStatusResponse, *Response, error)
Statuses(context.Context) (*AllProfileStatusesResponse, *Response, error)
QuickStatuses(context.Context) (*QuickProfileStatusesResponse, *Response, error)
Version(context.Context) (*LauncherVersionResponse, *Response, error)
ValidateProxy(context.Context, *ValidateProxyRequest) (*ValidateProxyResponse, *Response, error)
}
LauncherService manages running profiles via the local launcher.
type LauncherServiceOp ¶
type LauncherServiceOp struct {
// contains filtered or unexported fields
}
LauncherServiceOp is the concrete launcher service.
func (*LauncherServiceOp) Health ¶
func (s *LauncherServiceOp) Health(ctx context.Context) (*LauncherHealthResponse, *Response, error)
func (*LauncherServiceOp) QuickStatuses ¶
func (s *LauncherServiceOp) QuickStatuses(ctx context.Context) (*QuickProfileStatusesResponse, *Response, error)
func (*LauncherServiceOp) SaveQuick ¶
func (s *LauncherServiceOp) SaveQuick(ctx context.Context, reqBody *SaveQuickProfileRequest) (*EmptyDataResponse, *Response, error)
func (*LauncherServiceOp) Start ¶
func (s *LauncherServiceOp) Start(ctx context.Context, folderID, profileID string, opts StartProfileOptions) (*StartProfileResponse, *Response, error)
func (*LauncherServiceOp) StartQuick ¶
func (s *LauncherServiceOp) StartQuick(ctx context.Context, reqBody *StartQuickProfileRequest) (*StartQuickProfileResponse, *Response, error)
func (*LauncherServiceOp) Status ¶
func (s *LauncherServiceOp) Status(ctx context.Context, profileID string) (*ProfileRuntimeStatusResponse, *Response, error)
func (*LauncherServiceOp) Statuses ¶
func (s *LauncherServiceOp) Statuses(ctx context.Context) (*AllProfileStatusesResponse, *Response, error)
func (*LauncherServiceOp) Stop ¶
func (s *LauncherServiceOp) Stop(ctx context.Context, profileID string) (*EmptyDataResponse, *Response, error)
func (*LauncherServiceOp) StopAll ¶
func (s *LauncherServiceOp) StopAll(ctx context.Context, opts StopAllProfilesOptions) (*EmptyDataResponse, *Response, error)
func (*LauncherServiceOp) ValidateProxy ¶
func (s *LauncherServiceOp) ValidateProxy(ctx context.Context, reqBody *ValidateProxyRequest) (*ValidateProxyResponse, *Response, error)
func (*LauncherServiceOp) Version ¶
func (s *LauncherServiceOp) Version(ctx context.Context) (*LauncherVersionResponse, *Response, error)
func (*LauncherServiceOp) WaitForRunning ¶
func (s *LauncherServiceOp) WaitForRunning(ctx context.Context, profileID string, opts PollOptions) (*ProfileRuntimeStatusResponse, *Response, error)
type LauncherVersionData ¶
LauncherVersionData contains version info.
type LauncherVersionResponse ¶
type LauncherVersionResponse struct {
Status Status `json:"status"`
Data LauncherVersionData `json:"data"`
}
LauncherVersionResponse returns launcher version info.
func (*LauncherVersionResponse) GetStatus ¶
func (r *LauncherVersionResponse) GetStatus() Status
type ListFoldersData ¶
type ListFoldersData struct {
Folders []Folder `json:"folders"`
}
ListFoldersData wraps the list of folders.
type ListFoldersResponse ¶
type ListFoldersResponse struct {
Status Status `json:"status"`
Data ListFoldersData `json:"data"`
}
ListFoldersResponse contains folder listings.
func (*ListFoldersResponse) GetStatus ¶
func (r *ListFoldersResponse) GetStatus() Status
type ListOptions ¶
ListOptions models offset-based listing used by profile search.
type ListResourceMetasOptions ¶
type ListResourceMetasOptions struct {
Limit int
Offset int
ObjectName string
ObjectTypeID string
StorageType string
Creator string
Trashbin *bool
CreateStartDate string
CreateEndDate string
UpdateStartDate string
UpdateEndDate string
}
ListResourceMetasOptions controls resource meta listing.
type LocalToCloudObjectRequest ¶
type LocalToCloudObjectRequest struct {
ObjectPath string `json:"object_path"`
ObjectID string `json:"object_id,omitempty"`
}
LocalToCloudObjectRequest promotes a local object into cloud storage.
type LocaleProfile ¶
type LocaleProfile struct {
Localization *LocalizationFingerprint
Timezone *TimezoneFingerprint
}
LocaleProfile bundles localization and timezone fingerprint for a country.
func LocaleForCountry ¶
func LocaleForCountry(countryCode string) *LocaleProfile
LocaleForCountry returns a preset LocaleProfile for the given ISO 3166-1 alpha-2 country code. If the country is unknown, it falls back to en-US / UTC.
type LocalizationFingerprint ¶
type LocalizationFingerprint struct {
Languages string `json:"languages,omitempty"`
Locale string `json:"locale,omitempty"`
AcceptLanguages string `json:"accept_languages,omitempty"`
}
LocalizationFingerprint contains language and locale settings.
type ManagedExportResult ¶
type ManagedExportResult struct {
ExportJob *ExportStatusResponse
Archive *OrganizedArchive
}
ManagedExportResult combines export job details with filesystem placement.
type MediaDevicesFingerprint ¶
type MediaDevicesFingerprint struct {
AudioInputs int `json:"audio_inputs,omitempty"`
AudioOutputs int `json:"audio_outputs,omitempty"`
VideoInputs int `json:"video_inputs,omitempty"`
}
MediaDevicesFingerprint contains media device counts.
type MoveProfilesRequest ¶
type MoveProfilesRequest struct {
DestinationFolderID string `json:"dest_folder_id"`
IDs []string `json:"ids,omitempty"`
}
MoveProfilesRequest moves profiles into another folder.
type NavigatorFingerprint ¶
type NavigatorFingerprint struct {
}
NavigatorFingerprint contains navigator-related values.
type ObjectProfileUsage ¶
ObjectProfileUsage identifies one object-to-profile usage record.
type ObjectProfileUsagesResponse ¶
type ObjectProfileUsagesResponse struct {
Status Status `json:"status"`
Data []ObjectProfileUsage `json:"data"`
}
ObjectProfileUsagesResponse lists profile usages for one object.
func (*ObjectProfileUsagesResponse) GetStatus ¶
func (r *ObjectProfileUsagesResponse) GetStatus() Status
type Option ¶
Option configures a Client.
func WithCookiesURL ¶
WithCookiesURL overrides the pre-made cookies API base URL.
func WithHTTPClient ¶
WithHTTPClient overrides the underlying HTTP client.
func WithLauncherURL ¶
WithLauncherURL overrides the local launcher base URL.
func WithProxyURL ¶
WithProxyURL overrides the MLX profile proxy API base URL.
func WithRetry ¶
func WithRetry(opts RetryOptions) Option
WithRetry configures automatic retries for transient transport and MLX API failures.
func WithTimeout ¶
WithTimeout sets the HTTP client timeout.
func WithUserAgent ¶
WithUserAgent sets the user agent header.
type OrganizedArchive ¶
type OrganizedArchive struct {
SourcePath string
ArchiveDir string
ArchivePath string
ZipFileName string
FolderName string
}
OrganizedArchive describes where an exported archive ended up on disk.
type PatchProfileForProxyOptions ¶
type PatchProfileForProxyOptions struct {
// MinScreenWidth is the minimum screen width for the generated fingerprint.
// Profiles with a smaller width produce browser windows that may not fit on
// the operator's physical display. Default: 1920.
MinScreenWidth int
// MinScreenHeight is the minimum screen height for the generated fingerprint.
// Default: 1080.
MinScreenHeight int
// MaxScreenWidth is the maximum screen width. Default: 1920.
MaxScreenWidth int
// MaxScreenHeight is the maximum screen height. Default: 1080.
MaxScreenHeight int
}
PatchProfileForProxyOptions configures the behaviour of PatchProfileForProxy.
type PatchProfileRequest ¶
type PatchProfileRequest struct {
ProfileID string `json:"profile_id"`
Name string `json:"name,omitempty"`
AutoUpdateCore *bool `json:"auto_update_core,omitempty"`
CoreVersion int `json:"core_version,omitempty"`
CoreMinorVersion int `json:"core_minor_version,omitempty"`
Proxy *Proxy `json:"proxy,omitempty"`
CustomStartURLs []string `json:"custom_start_urls,omitempty"`
Notes string `json:"notes,omitempty"`
Parameters *ProfileParameters `json:"parameters,omitempty"`
Tags []string `json:"tags,omitempty"`
}
PatchProfileRequest partially updates a profile.
type PollOptions ¶
type PollOptions struct {
InitialInterval time.Duration
MaxInterval time.Duration
Timeout time.Duration
Multiplier float64
}
PollOptions controls retry/backoff behavior for launcher polling helpers.
type Profile ¶
type Profile struct {
ID string `json:"id"`
Name string `json:"name"`
FolderID string `json:"folder_id"`
ABPStatus bool `json:"abp_status"`
BrowserType string `json:"browser_type"`
OSType string `json:"os_type"`
CoreVersion int `json:"core_version"`
Notes string `json:"notes"`
CreatedBy string `json:"created_by"`
CreatedAt string `json:"created_at"`
InUseBy string `json:"in_use_by"`
LockedBy string `json:"locked_by"`
LastLaunchedAt string `json:"last_launched_at"`
LastLaunchedBy string `json:"last_launched_by"`
LastLaunchedOn string `json:"last_launched_on"`
UpdatedAt string `json:"updated_at"`
PasswordProtected bool `json:"password_protected"`
IsLocal bool `json:"is_local"`
}
Profile is the lightweight profile view returned by search.
type ProfileBatchFailure ¶
ProfileBatchFailure records one failed profile operation.
type ProfileFlags ¶
type ProfileFlags struct {
AudioMasking string `json:"audio_masking,omitempty"`
FontsMasking string `json:"fonts_masking,omitempty"`
GeolocationMasking string `json:"geolocation_masking,omitempty"`
GeolocationPopup string `json:"geolocation_popup,omitempty"`
GraphicsMasking string `json:"graphics_masking,omitempty"`
GraphicsNoise string `json:"graphics_noise,omitempty"`
LocalizationMasking string `json:"localization_masking,omitempty"`
MediaDevicesMasking string `json:"media_devices_masking,omitempty"`
PortsMasking string `json:"ports_masking,omitempty"`
ProxyMasking string `json:"proxy_masking,omitempty"`
QuicMode string `json:"quic_mode,omitempty"`
ScreenMasking string `json:"screen_masking,omitempty"`
TimezoneMasking string `json:"timezone_masking,omitempty"`
WebRTCMasking string `json:"webrtc_masking,omitempty"`
CanvasNoise string `json:"canvas_noise,omitempty"`
StartupBehavior string `json:"startup_behavior,omitempty"`
}
ProfileFlags contains the fingerprint masking flags used by profile create/update APIs.
type ProfileMeta ¶
type ProfileMeta struct {
ID string `json:"id"`
Name string `json:"name"`
Notes string `json:"notes"`
BrowserType string `json:"browser_type"`
CoreVersion int `json:"core_version"`
IsAutoUpdate bool `json:"is_auto_update"`
IsLocal bool `json:"is_local"`
OSType string `json:"os_type"`
FolderID string `json:"folder_id"`
WorkspaceID string `json:"workspace_id"`
CreatedAt string `json:"created_at"`
CreatedBy string `json:"created_by"`
InUseBy string `json:"in_use_by"`
LastLaunchedAt string `json:"last_launched_at"`
LastLaunchedBy string `json:"last_launched_by"`
LastLaunchedOn string `json:"last_launched_on"`
LastUpdatedAt string `json:"last_update_at"`
LastUpdatedBy string `json:"last_updated_by"`
RemovedAt string `json:"removed_at"`
RemovedBy string `json:"removed_by"`
Status string `json:"status"`
Parameters *ProfileParameters `json:"parameters,omitempty"`
}
ProfileMeta is a detailed profile metadata record.
func (*ProfileMeta) CheckLocal ¶
func (m *ProfileMeta) CheckLocal() bool
CheckLocal returns the confirmed local/cloud storage signal for a profile meta.
It intentionally ignores the top-level `ProfileMeta.IsLocal` field because live MLX responses from `/profile/metas` returned incorrect values for real local profiles. When storage parameters are absent, this helper returns false instead of falling back to the buggy top-level flag.
type ProfileMetasData ¶
type ProfileMetasData struct {
Profiles []ProfileMeta `json:"profiles"`
}
ProfileMetasData contains detailed profile metadata records.
type ProfileMetasRequest ¶
type ProfileMetasRequest struct {
IDs []string `json:"ids"`
}
ProfileMetasRequest requests metadata for profiles.
type ProfileMetasResponse ¶
type ProfileMetasResponse struct {
Status Status `json:"status"`
Data ProfileMetasData `json:"data"`
}
ProfileMetasResponse returns detailed profile metadata.
func (*ProfileMetasResponse) GetStatus ¶
func (r *ProfileMetasResponse) GetStatus() Status
type ProfileObjectUsage ¶
type ProfileObjectUsage struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
MetaInfo json.RawMessage `json:"meta_info"`
IsEnabled bool `json:"is_enabled"`
}
ProfileObjectUsage describes one object associated with a profile.
type ProfileObjectUsagesRequest ¶
type ProfileObjectUsagesRequest struct {
ObjectType string `json:"object_type"`
ProfileID string `json:"profile_id"`
}
ProfileObjectUsagesRequest queries resource usages for a profile and object type.
type ProfileObjectUsagesResponse ¶
type ProfileObjectUsagesResponse struct {
Status Status `json:"status"`
Data []ProfileObjectUsage `json:"data"`
}
ProfileObjectUsagesResponse lists objects associated with one profile.
func (*ProfileObjectUsagesResponse) GetStatus ¶
func (r *ProfileObjectUsagesResponse) GetStatus() Status
type ProfileParameters ¶
type ProfileParameters struct {
Flags *ProfileFlags `json:"flags,omitempty"`
Storage *Storage `json:"storage,omitempty"`
Fingerprint *Fingerprint `json:"fingerprint,omitempty"`
Proxy *Proxy `json:"proxy,omitempty"`
CustomStartURLs []string `json:"custom_start_urls,omitempty"`
}
ProfileParameters contains flags, storage, proxy, and fingerprint settings.
type ProfileRuntimeStatus ¶
type ProfileRuntimeStatus struct {
ProfileID string `json:"profile_id"`
Name string `json:"name"`
Status string `json:"status"`
BrowserType string `json:"browser_type"`
CoreVersion int `json:"core_version"`
FolderID string `json:"folder_id"`
WorkspaceID string `json:"workspace_id"`
InUseBy string `json:"in_use_by"`
LastLaunchedAt string `json:"last_launched_at"`
LastLaunchedBy string `json:"last_launched_by"`
LastLaunchedOn string `json:"last_launched_on"`
Message string `json:"message"`
IsQuick bool `json:"is_quick"`
Timestamp int64 `json:"timestamp"`
}
ProfileRuntimeStatus describes the running state of one profile.
type ProfileRuntimeStatusResponse ¶
type ProfileRuntimeStatusResponse struct {
Status Status `json:"status"`
Data ProfileRuntimeStatus `json:"data"`
}
ProfileRuntimeStatusResponse contains a single profile status.
func (*ProfileRuntimeStatusResponse) GetStatus ¶
func (r *ProfileRuntimeStatusResponse) GetStatus() Status
type ProfileSummary ¶
type ProfileSummary struct {
Fonts []string `json:"fonts,omitempty"`
Geolocation *GeolocationFingerprint `json:"geolocation,omitempty"`
Graphic *GraphicFingerprint `json:"graphic,omitempty"`
Localization *LocalizationFingerprint `json:"localization,omitempty"`
MaskingOptions map[string]any `json:"masking_options,omitempty"`
MediaDevices *MediaDevicesFingerprint `json:"media_devices,omitempty"`
Ports []int `json:"ports,omitempty"`
Screen *ScreenFingerprint `json:"screen,omitempty"`
Timezone *TimezoneFingerprint `json:"timezone,omitempty"`
WebRTC *WebRTCFingerprint `json:"webrtc,omitempty"`
}
ProfileSummary contains ready-to-start fingerprint summary information.
type ProfileSummaryResponse ¶
type ProfileSummaryResponse struct {
Status Status `json:"status"`
Data ProfileSummary `json:"data"`
}
ProfileSummaryResponse contains fingerprint summary details.
func (*ProfileSummaryResponse) GetStatus ¶
func (r *ProfileSummaryResponse) GetStatus() Status
type ProfilesService ¶
type ProfilesService interface {
Create(context.Context, *CreateProfileRequest) (*CreateProfileResponse, *Response, error)
Search(context.Context, *SearchProfilesRequest) (*SearchProfilesResponse, *Response, error)
FindByName(context.Context, string, *FindProfileOptions) (*Profile, *Response, error)
Update(context.Context, *UpdateProfileRequest) (*EmptyDataResponse, *Response, error)
Patch(context.Context, *PatchProfileRequest) (*EmptyDataResponse, *Response, error)
Delete(context.Context, *DeleteProfilesRequest) (*EmptyDataResponse, *Response, error)
Restore(context.Context, *RestoreProfilesRequest) (*EmptyDataResponse, *Response, error)
Clone(context.Context, *CloneProfileRequest) (*CreateProfileResponse, *Response, error)
Move(context.Context, *MoveProfilesRequest) (*EmptyDataResponse, *Response, error)
GetMeta(context.Context, string) (*ProfileMeta, *Response, error)
GetMetas(context.Context, *ProfileMetasRequest) (*ProfileMetasResponse, *Response, error)
GetSummary(context.Context, string) (*ProfileSummaryResponse, *Response, error)
}
ProfilesService describes profile lifecycle operations.
type ProfilesServiceOp ¶
type ProfilesServiceOp struct {
// contains filtered or unexported fields
}
ProfilesServiceOp is the concrete ProfilesService implementation.
func (*ProfilesServiceOp) Clone ¶
func (s *ProfilesServiceOp) Clone(ctx context.Context, reqBody *CloneProfileRequest) (*CreateProfileResponse, *Response, error)
func (*ProfilesServiceOp) Create ¶
func (s *ProfilesServiceOp) Create(ctx context.Context, reqBody *CreateProfileRequest) (*CreateProfileResponse, *Response, error)
func (*ProfilesServiceOp) Delete ¶
func (s *ProfilesServiceOp) Delete(ctx context.Context, reqBody *DeleteProfilesRequest) (*EmptyDataResponse, *Response, error)
func (*ProfilesServiceOp) FindByName ¶
func (s *ProfilesServiceOp) FindByName(ctx context.Context, profileName string, opts *FindProfileOptions) (*Profile, *Response, error)
func (*ProfilesServiceOp) GetMeta ¶
func (s *ProfilesServiceOp) GetMeta(ctx context.Context, profileID string) (*ProfileMeta, *Response, error)
func (*ProfilesServiceOp) GetMetas ¶
func (s *ProfilesServiceOp) GetMetas(ctx context.Context, reqBody *ProfileMetasRequest) (*ProfileMetasResponse, *Response, error)
func (*ProfilesServiceOp) GetSummary ¶
func (s *ProfilesServiceOp) GetSummary(ctx context.Context, metaID string) (*ProfileSummaryResponse, *Response, error)
func (*ProfilesServiceOp) Move ¶
func (s *ProfilesServiceOp) Move(ctx context.Context, reqBody *MoveProfilesRequest) (*EmptyDataResponse, *Response, error)
func (*ProfilesServiceOp) Patch ¶
func (s *ProfilesServiceOp) Patch(ctx context.Context, reqBody *PatchProfileRequest) (*EmptyDataResponse, *Response, error)
func (*ProfilesServiceOp) Restore ¶
func (s *ProfilesServiceOp) Restore(ctx context.Context, reqBody *RestoreProfilesRequest) (*EmptyDataResponse, *Response, error)
func (*ProfilesServiceOp) Search ¶
func (s *ProfilesServiceOp) Search(ctx context.Context, reqBody *SearchProfilesRequest) (*SearchProfilesResponse, *Response, error)
func (*ProfilesServiceOp) Update ¶
func (s *ProfilesServiceOp) Update(ctx context.Context, reqBody *UpdateProfileRequest) (*EmptyDataResponse, *Response, error)
type Proxy ¶
type Proxy struct {
Host string `json:"host,omitempty"`
Type string `json:"type,omitempty"`
Port int `json:"port,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
SaveTraffic bool `json:"save_traffic,omitempty"`
Country string `json:"country,omitempty"`
Region string `json:"region,omitempty"`
City string `json:"city,omitempty"`
SessionID string `json:"session_id,omitempty"`
Provider string `json:"provider,omitempty"`
ConnectionString string `json:"connection_string,omitempty"`
RetentionKey string `json:"retention_key,omitempty"`
RetentionSecret string `json:"retention_secret,omitempty"`
}
Proxy contains proxy settings.
func BuildProfileProxyFromGenerated ¶
func BuildProfileProxyFromGenerated(conn *GeneratedProxyConnection) *Proxy
BuildProfileProxyFromGenerated converts a parsed connection into a profile proxy payload.
Example ¶
package main
import (
"fmt"
mlx "github.com/minskyagenda0708-cmd/mlx-go-sdk"
)
func main() {
conn, _ := mlx.ParseGeneratedProxyConnection(
"gate.multilogin.com:1080:2235470499_bc98e4f8_multilogin_com-country-us-region-new_jersey-city-east_brunswick-sid-demo:secret",
mlx.ProxyProtocolSOCKS5,
)
proxy := mlx.BuildProfileProxyFromGenerated(conn)
fmt.Println(proxy.Type)
fmt.Println(proxy.Country, proxy.Region, proxy.City)
}
Output: socks5 us new_jersey east_brunswick
type ProxyCheckResult ¶
type ProxyCheckResult struct {
Alive bool // true if at least one target responded within the timeout
LatencyMs int // best (minimum) time-to-first-byte across targets, in ms
Target string // the target URL that produced the best measurement
Err error // last error encountered, if Alive is false
}
ProxyCheckResult is the outcome of a single proxy health check.
type ProxyChecker ¶
type ProxyChecker interface {
Check(ctx context.Context, p *Proxy) ProxyCheckResult
}
ProxyChecker measures whether a proxy is alive and how fast it is.
The default implementation is HTTPProxyChecker. The interface exists so a JA3/TLS-impersonating checker can be substituted later without changing callers such as EnsureHealthyProxy.
type ProxyProtocol ¶
type ProxyProtocol string
ProxyProtocol identifies the upstream proxy protocol.
const ( ProxyProtocolSOCKS5 ProxyProtocol = "socks5" ProxyProtocolHTTP ProxyProtocol = "http" )
type ProxyService ¶
type ProxyService interface {
Generate(context.Context, *GenerateProxyRequest) (*GenerateProxyResponse, *Response, error)
GetUsage(context.Context) (*ProxyUsageResponse, *Response, error)
ParseConnectionString(string, ProxyProtocol) (*GeneratedProxyConnection, error)
BuildProfileProxy(*GeneratedProxyConnection) *Proxy
GenerateProfileProxy(context.Context, *GenerateProfileProxyRequest) (*GenerateProfileProxyResult, error)
EnsureHealthyProxy(context.Context, *Proxy, EnsureHealthyProfileProxyOptions) (*Proxy, bool, error)
}
ProxyService manages MLX profile-proxy workflows.
type ProxyServiceOp ¶
type ProxyServiceOp struct {
// contains filtered or unexported fields
}
ProxyServiceOp is the concrete proxy service implementation.
func (*ProxyServiceOp) BuildProfileProxy ¶
func (s *ProxyServiceOp) BuildProfileProxy(conn *GeneratedProxyConnection) *Proxy
BuildProfileProxy converts a parsed generated connection into the profile-bound proxy payload.
func (*ProxyServiceOp) EnsureHealthyProxy ¶
func (s *ProxyServiceOp) EnsureHealthyProxy(ctx context.Context, current *Proxy, opts EnsureHealthyProfileProxyOptions) (*Proxy, bool, error)
EnsureHealthyProxy verifies current and finds a geo-preserving replacement if needed.
func (*ProxyServiceOp) Generate ¶
func (s *ProxyServiceOp) Generate(ctx context.Context, reqBody *GenerateProxyRequest) (*GenerateProxyResponse, *Response, error)
Generate requests MLX-managed proxies and parses the returned connection strings.
func (*ProxyServiceOp) GenerateProfileProxy ¶
func (s *ProxyServiceOp) GenerateProfileProxy(ctx context.Context, reqBody *GenerateProfileProxyRequest) (*GenerateProfileProxyResult, error)
GenerateProfileProxy generates one proxy connection and converts it into a profile payload.
func (*ProxyServiceOp) GetUsage ¶
func (s *ProxyServiceOp) GetUsage(ctx context.Context) (*ProxyUsageResponse, *Response, error)
GetUsage returns proxy traffic data for the authenticated account.
func (*ProxyServiceOp) ParseConnectionString ¶
func (s *ProxyServiceOp) ParseConnectionString(raw string, protocol ProxyProtocol) (*GeneratedProxyConnection, error)
ParseConnectionString parses the MLX connection string into a typed proxy model.
type ProxySessionType ¶
type ProxySessionType string
ProxySessionType identifies whether generated proxy credentials are sticky or rotating.
const ( ProxySessionSticky ProxySessionType = "sticky" ProxySessionRotating ProxySessionType = "rotating" )
type ProxyUsageResponse ¶
type ProxyUsageResponse struct {
Traffic int64 `json:"traffic"`
BillingID string `json:"billingId"`
}
ProxyUsageResponse reports proxy traffic usage for the authenticated account.
type ProxyValidationData ¶
type ProxyValidationData struct {
Accuracy float64 `json:"accuracy"`
Altitude float64 `json:"altitude"`
CountryCode string `json:"country_code"`
IP string `json:"ip"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Timezone string `json:"timezone"`
}
ProxyValidationData contains geolocation and accuracy data for a proxy.
type QuickProfileRuntimeStatus ¶
type QuickProfileRuntimeStatus struct {
Name string `json:"name"`
Status string `json:"status"`
Message string `json:"message"`
BrowserType string `json:"browser_type"`
IsQuick bool `json:"is_quick"`
Timestamp int64 `json:"timestamp"`
}
QuickProfileRuntimeStatus describes quick profile state.
type QuickProfileStatusesData ¶
type QuickProfileStatusesData struct {
ActiveCounter int `json:"active_counter"`
States map[string]QuickProfileRuntimeStatus `json:"states"`
}
QuickProfileStatusesData wraps quick profile states.
type QuickProfileStatusesResponse ¶
type QuickProfileStatusesResponse struct {
Status Status `json:"status"`
Data QuickProfileStatusesData `json:"data"`
}
QuickProfileStatusesResponse contains quick profile states.
func (*QuickProfileStatusesResponse) GetStatus ¶
func (r *QuickProfileStatusesResponse) GetStatus() Status
type RemoveTagsRequest ¶
type RemoveTagsRequest struct {
IDs []string `json:"ids"`
}
RemoveTagsRequest removes tags.
type ResourceMeta ¶
type ResourceMeta struct {
ID string `json:"id"`
ObjectTypeID string `json:"object_type_id"`
ObjectName string `json:"object_name"`
ObjectSize int64 `json:"object_size"`
CurrentVersion string `json:"current_version"`
CreatedAt string `json:"created_at"`
CreatedBy string `json:"created_by"`
UpdateAt string `json:"update_at"`
UpdateBy string `json:"update_by"`
StorageType string `json:"storage_type"`
MetaInfo string `json:"meta_info"`
IsDefault bool `json:"is_default"`
IsInTrashbin bool `json:"is_in_trashbin"`
}
ResourceMeta describes one resource object metadata record.
type ResourceMetaResponse ¶
type ResourceMetaResponse struct {
Status Status `json:"status"`
Data ResourceMeta `json:"data"`
}
ResourceMetaResponse returns one resource object metadata record.
func (*ResourceMetaResponse) GetStatus ¶
func (r *ResourceMetaResponse) GetStatus() Status
type ResourceMetasData ¶
type ResourceMetasData struct {
Objects []ResourceMeta `json:"objects"`
}
ResourceMetasData wraps listed resource objects.
type ResourceMetasResponse ¶
type ResourceMetasResponse struct {
Status Status `json:"status"`
Data ResourceMetasData `json:"data"`
}
ResourceMetasResponse contains listed resource objects.
func (*ResourceMetasResponse) GetStatus ¶
func (r *ResourceMetasResponse) GetStatus() Status
type ResourceType ¶
ResourceType identifies one resource object type.
type ResourceTypesData ¶
type ResourceTypesData struct {
Types []ResourceType `json:"types"`
}
ResourceTypesData wraps available resource object types.
type ResourceTypesResponse ¶
type ResourceTypesResponse struct {
Status Status `json:"status"`
Data ResourceTypesData `json:"data"`
}
ResourceTypesResponse contains available resource object types.
func (*ResourceTypesResponse) GetStatus ¶
func (r *ResourceTypesResponse) GetStatus() Status
type ResourcesService ¶
type ResourcesService interface {
ListTypes(context.Context) (*ResourceTypesResponse, *Response, error)
ListMetas(context.Context, *ListResourceMetasOptions) (*ResourceMetasResponse, *Response, error)
ListProfileTemplates(context.Context, *ListResourceMetasOptions) (*ResourceMetasResponse, *Response, error)
ListExtensions(context.Context, *ListResourceMetasOptions) (*ResourceMetasResponse, *Response, error)
GetMeta(context.Context, string) (*ResourceMetaResponse, *Response, error)
Delete(context.Context, string, bool) (*EmptyDataResponse, *Response, error)
Restore(context.Context, string) (*EmptyDataResponse, *Response, error)
ObjectProfileUsages(context.Context, string) (*ObjectProfileUsagesResponse, *Response, error)
ProfileObjectUsages(context.Context, *ProfileObjectUsagesRequest) (*ProfileObjectUsagesResponse, *Response, error)
ProfileExtensionUsages(context.Context, string) (*ProfileObjectUsagesResponse, *Response, error)
Upload(context.Context, *UploadObjectRequest) (*CreateAndUploadObjectResponse, *Response, error)
CreateAndUpload(context.Context, *CreateAndUploadObjectRequest) (*CreateAndUploadObjectResponse, *Response, error)
CreateProfileTemplate(context.Context, *CreateProfileTemplateRequest) (*CreateAndUploadObjectResponse, *Response, error)
UploadExtension(context.Context, *UploadExtensionRequest) (*CreateAndUploadObjectResponse, *Response, error)
LocalToCloud(context.Context, *LocalToCloudObjectRequest) (*CreateAndUploadObjectResponse, *Response, error)
CreateExtensionFromURL(context.Context, *CreateExtensionFromURLRequest) (*EmptyDataResponse, *Response, error)
CreateExtensionFromChromeWebStore(context.Context, *CreateChromeWebStoreExtensionRequest) (*EmptyDataResponse, *Response, error)
EnableExtensionForProfiles(context.Context, string, *SetResourceProfilesRequest) (*StringDataResponse, *Response, error)
DisableExtensionForProfiles(context.Context, string, *SetResourceProfilesRequest) (*StringDataResponse, *Response, error)
Download(context.Context, string) (*DownloadResourceResponse, *Response, error)
}
ResourcesService manages template/resource objects backed by Multilogin resources and launcher object storage.
type ResourcesServiceOp ¶
type ResourcesServiceOp struct {
// contains filtered or unexported fields
}
ResourcesServiceOp is the concrete resources service implementation.
func (*ResourcesServiceOp) CreateAndUpload ¶
func (s *ResourcesServiceOp) CreateAndUpload(ctx context.Context, reqBody *CreateAndUploadObjectRequest) (*CreateAndUploadObjectResponse, *Response, error)
func (*ResourcesServiceOp) CreateExtensionFromChromeWebStore ¶
func (s *ResourcesServiceOp) CreateExtensionFromChromeWebStore(ctx context.Context, reqBody *CreateChromeWebStoreExtensionRequest) (*EmptyDataResponse, *Response, error)
func (*ResourcesServiceOp) CreateExtensionFromURL ¶
func (s *ResourcesServiceOp) CreateExtensionFromURL(ctx context.Context, reqBody *CreateExtensionFromURLRequest) (*EmptyDataResponse, *Response, error)
func (*ResourcesServiceOp) CreateProfileTemplate ¶
func (s *ResourcesServiceOp) CreateProfileTemplate(ctx context.Context, reqBody *CreateProfileTemplateRequest) (*CreateAndUploadObjectResponse, *Response, error)
func (*ResourcesServiceOp) Delete ¶
func (s *ResourcesServiceOp) Delete(ctx context.Context, resourceID string, permanently bool) (*EmptyDataResponse, *Response, error)
func (*ResourcesServiceOp) DisableExtensionForProfiles ¶
func (s *ResourcesServiceOp) DisableExtensionForProfiles(ctx context.Context, resourceID string, reqBody *SetResourceProfilesRequest) (*StringDataResponse, *Response, error)
func (*ResourcesServiceOp) Download ¶
func (s *ResourcesServiceOp) Download(ctx context.Context, resourceID string) (*DownloadResourceResponse, *Response, error)
func (*ResourcesServiceOp) EnableExtensionForProfiles ¶
func (s *ResourcesServiceOp) EnableExtensionForProfiles(ctx context.Context, resourceID string, reqBody *SetResourceProfilesRequest) (*StringDataResponse, *Response, error)
func (*ResourcesServiceOp) GetMeta ¶
func (s *ResourcesServiceOp) GetMeta(ctx context.Context, resourceID string) (*ResourceMetaResponse, *Response, error)
func (*ResourcesServiceOp) ListExtensions ¶
func (s *ResourcesServiceOp) ListExtensions(ctx context.Context, opts *ListResourceMetasOptions) (*ResourceMetasResponse, *Response, error)
func (*ResourcesServiceOp) ListMetas ¶
func (s *ResourcesServiceOp) ListMetas(ctx context.Context, opts *ListResourceMetasOptions) (*ResourceMetasResponse, *Response, error)
func (*ResourcesServiceOp) ListProfileTemplates ¶
func (s *ResourcesServiceOp) ListProfileTemplates(ctx context.Context, opts *ListResourceMetasOptions) (*ResourceMetasResponse, *Response, error)
func (*ResourcesServiceOp) ListTypes ¶
func (s *ResourcesServiceOp) ListTypes(ctx context.Context) (*ResourceTypesResponse, *Response, error)
func (*ResourcesServiceOp) LocalToCloud ¶
func (s *ResourcesServiceOp) LocalToCloud(ctx context.Context, reqBody *LocalToCloudObjectRequest) (*CreateAndUploadObjectResponse, *Response, error)
func (*ResourcesServiceOp) ObjectProfileUsages ¶
func (s *ResourcesServiceOp) ObjectProfileUsages(ctx context.Context, objectID string) (*ObjectProfileUsagesResponse, *Response, error)
func (*ResourcesServiceOp) ProfileExtensionUsages ¶
func (s *ResourcesServiceOp) ProfileExtensionUsages(ctx context.Context, profileID string) (*ProfileObjectUsagesResponse, *Response, error)
func (*ResourcesServiceOp) ProfileObjectUsages ¶
func (s *ResourcesServiceOp) ProfileObjectUsages(ctx context.Context, reqBody *ProfileObjectUsagesRequest) (*ProfileObjectUsagesResponse, *Response, error)
func (*ResourcesServiceOp) Restore ¶
func (s *ResourcesServiceOp) Restore(ctx context.Context, resourceID string) (*EmptyDataResponse, *Response, error)
func (*ResourcesServiceOp) Upload ¶
func (s *ResourcesServiceOp) Upload(ctx context.Context, reqBody *UploadObjectRequest) (*CreateAndUploadObjectResponse, *Response, error)
func (*ResourcesServiceOp) UploadExtension ¶
func (s *ResourcesServiceOp) UploadExtension(ctx context.Context, reqBody *UploadExtensionRequest) (*CreateAndUploadObjectResponse, *Response, error)
type RestoreProfilesRequest ¶
type RestoreProfilesRequest struct {
IDs []string `json:"ids"`
}
RestoreProfilesRequest restores soft-deleted profiles.
type RetryOptions ¶
type RetryOptions struct {
MaxAttempts int
InitialInterval time.Duration
MaxInterval time.Duration
Multiplier float64
Jitter float64
ShouldRetry func(error) bool
Rand *rand.Rand
}
RetryOptions controls transport-level retry/backoff behavior.
type SaveQuickProfileItem ¶
type SaveQuickProfileItem struct {
ProfileID string `json:"profile_id"`
}
SaveQuickProfileItem identifies a quick profile to save.
type SaveQuickProfileRequest ¶
type SaveQuickProfileRequest struct {
Data []SaveQuickProfileItem `json:"data"`
}
SaveQuickProfileRequest configures saving quick profiles.
type ScreenFingerprint ¶
type ScreenFingerprint struct {
Height int `json:"height,omitempty"`
PixelRatio float64 `json:"pixel_ratio,omitempty"`
Width int `json:"width,omitempty"`
}
ScreenFingerprint contains screen-related values.
func PickScreenResolution ¶
func PickScreenResolution(opts PatchProfileForProxyOptions) *ScreenFingerprint
PickScreenResolution selects a believable screen resolution within opts bounds (defaults: 1920x1080). Exposed for CLI flag-based profile creation.
type SearchProfilesData ¶
type SearchProfilesData struct {
Profiles []Profile `json:"profiles"`
TotalCount int `json:"total_count"`
}
SearchProfilesData contains a page of profiles.
type SearchProfilesRequest ¶
type SearchProfilesRequest struct {
IsRemoved bool `json:"is_removed"`
Limit int `json:"limit"`
Offset int `json:"offset"`
SearchText string `json:"search_text"`
StorageType string `json:"storage_type"`
FolderID string `json:"folder_id,omitempty"`
BrowserType string `json:"browser_type,omitempty"`
OSType string `json:"os_type,omitempty"`
OrderBy string `json:"order_by,omitempty"`
Sort string `json:"sort,omitempty"`
CoreVersion int `json:"core_version,omitempty"`
Tags []string `json:"tags,omitempty"`
}
SearchProfilesRequest searches profiles.
type SearchProfilesResponse ¶
type SearchProfilesResponse struct {
Status Status `json:"status"`
Data SearchProfilesData `json:"data"`
}
SearchProfilesResponse contains search results.
func (*SearchProfilesResponse) GetStatus ¶
func (r *SearchProfilesResponse) GetStatus() Status
type SearchTagsData ¶
SearchTagsData wraps the list of tags and total count.
type SearchTagsRequest ¶
type SearchTagsRequest struct {
SearchText string `json:"search_text"`
Limit int `json:"limit"`
Offset int `json:"offset"`
OrderBy string `json:"order_by"`
Sort string `json:"sort"`
}
SearchTagsRequest searches tags.
type SearchTagsResponse ¶
type SearchTagsResponse struct {
Status Status `json:"status"`
Data SearchTagsData `json:"data"`
}
SearchTagsResponse contains tag search results.
func (*SearchTagsResponse) GetStatus ¶
func (r *SearchTagsResponse) GetStatus() Status
GetStatus implements the status getter interface.
type SeedProfileCookiesOptions ¶
type SeedProfileCookiesOptions struct {
ProfileID string
FolderID string
TargetWebsite string
AdditionalWebsite string
CreateMetadataIfMissing bool
StrictMode bool
ImportAdvancedCookies bool
CookieBundleIndex int
}
SeedProfileCookiesOptions configures the high-level cookie seeding helper.
type SeedProfileCookiesResult ¶
type SeedProfileCookiesResult struct {
MetadataCreated bool
MetadataUpdated bool
ProfileID string
FolderID string
TargetWebsite string
CookieCount int
SelectedBundle *CookieBundle
ImportResponse *EmptyDataResponse
}
SeedProfileCookiesResult contains the outcome of metadata creation/update, cookie selection, and import.
type SetResourceProfilesRequest ¶
type SetResourceProfilesRequest struct {
ProfileIDs []string `json:"profile_ids"`
}
SetResourceProfilesRequest enables or disables a resource for a set of profiles.
type StartProfileAutomationByNameOptions ¶
type StartProfileAutomationByNameOptions struct {
FindOptions *FindProfileOptions
StartOptions StartProfileOptions
WaitForRunning bool
PollOptions PollOptions
}
StartProfileAutomationByNameOptions controls lookup, automation normalization, and endpoint resolution.
type StartProfileByNameOptions ¶
type StartProfileByNameOptions struct {
FindOptions *FindProfileOptions
StartOptions StartProfileOptions
WaitForRunning bool
PollOptions PollOptions
}
StartProfileByNameOptions controls the lookup and launcher behavior for a start workflow.
type StartProfileOptions ¶
type StartProfileOptions struct {
AutomationType AutomationType
Headless bool
StrictMode bool
}
StartProfileOptions configures profile start requests.
type StartProfileResponse ¶
type StartProfileResponse struct {
Status Status `json:"status"`
Data StartedProfileData `json:"data"`
}
StartProfileResponse contains the launcher port and runtime profile info.
func (*StartProfileResponse) GetStatus ¶
func (r *StartProfileResponse) GetStatus() Status
type StartQuickProfileRequest ¶
type StartQuickProfileRequest struct {
BrowserType string `json:"browser_type,omitempty"`
OSType string `json:"os_type,omitempty"`
ScriptFile string `json:"script_file,omitempty"`
AutomationType AutomationType `json:"automation,omitempty"`
CoreVersion int `json:"core_version,omitempty"`
CoreMinorVersion int `json:"core_minor_version,omitempty"`
Headless bool `json:"is_headless,omitempty"`
Parameters *ProfileParameters `json:"parameters,omitempty"`
CustomStartURLs []string `json:"custom_start_urls,omitempty"`
}
StartQuickProfileRequest configures a quick profile start.
type StartQuickProfileResponse ¶
type StartQuickProfileResponse struct {
Status Status `json:"status"`
Data StartedProfileData `json:"data"`
}
StartQuickProfileResponse contains the launcher port and runtime info for a quick profile.
func (*StartQuickProfileResponse) GetStatus ¶
func (r *StartQuickProfileResponse) GetStatus() Status
type StartedProfileAutomationWorkflowResult ¶
type StartedProfileAutomationWorkflowResult struct {
Profile *Profile
StartResponse *StartProfileResponse
RuntimeStatus *ProfileRuntimeStatusResponse
RequestedAutomation AutomationType
LauncherAutomation AutomationType
CDPPort string
CDPWebSocketURL string
RodControlURL string
}
StartedProfileAutomationWorkflowResult contains the resolved profile, launcher results, and CDP endpoints.
type StartedProfileData ¶
type StartedProfileData struct {
BrowserType string `json:"browser_type"`
CoreVersion int `json:"core_version"`
ID string `json:"id"`
IsQuick bool `json:"is_quick"`
Port string `json:"port"`
RequestedAutomation AutomationType `json:"requested_automation,omitempty"`
LauncherAutomation AutomationType `json:"launcher_automation,omitempty"`
CDPPort string `json:"cdp_port,omitempty"`
}
StartedProfileData contains launcher startup output.
func (*StartedProfileData) ResolveCDPWebSocketURL ¶
func (d *StartedProfileData) ResolveCDPWebSocketURL(ctx context.Context) (string, error)
func (*StartedProfileData) ResolveRodControlURL ¶
func (d *StartedProfileData) ResolveRodControlURL(ctx context.Context) (string, error)
type StartedProfileWorkflowResult ¶
type StartedProfileWorkflowResult struct {
Profile *Profile
StartResponse *StartProfileResponse
RuntimeStatus *ProfileRuntimeStatusResponse
}
StartedProfileWorkflowResult contains the resolved profile and launcher results.
type Status ¶
type Status struct {
ErrorCode string `json:"error_code"`
HTTPCode int `json:"http_code"`
Message string `json:"message"`
}
Status is the common status envelope returned by MultiloginX endpoints.
type StopAllProfilesOptions ¶
type StopAllProfilesOptions struct {
Type string
}
StopAllProfilesOptions controls stop-all behavior.
type StopProfileByNameOptions ¶
type StopProfileByNameOptions struct {
FindOptions *FindProfileOptions
IgnoreAlreadyStopped bool
WaitForStopped bool
PollOptions PollOptions
}
StopProfileByNameOptions controls the lookup used before stopping a profile.
type StoppedProfileWorkflowResult ¶
type StoppedProfileWorkflowResult struct {
Profile *Profile
StopResponse *EmptyDataResponse
RuntimeStatus *ProfileRuntimeStatusResponse
}
StoppedProfileWorkflowResult contains the resolved profile and stop response.
type Storage ¶
type Storage struct {
IsLocal bool `json:"is_local"`
SaveServiceWorker bool `json:"save_service_worker,omitempty"`
}
Storage contains storage-related profile settings.
type StringDataResponse ¶
StringDataResponse captures endpoints that return a simple string payload.
func (*StringDataResponse) GetStatus ¶
func (r *StringDataResponse) GetStatus() Status
type Tag ¶
type Tag struct {
ID string `json:"id"`
Name string `json:"name"`
Color string `json:"color"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
CreatedBy string `json:"created_by"`
InUseCount int `json:"in_use_count"`
}
Tag describes a tag.
type TagsResponse ¶
TagsResponse contains tag results.
func (*TagsResponse) GetStatus ¶
func (r *TagsResponse) GetStatus() Status
GetStatus implements the status getter interface.
type TagsService ¶
type TagsService interface {
Create(context.Context, *CreateTagsRequest) (*TagsResponse, *Response, error)
Update(context.Context, *UpdateTagsRequest) (*TagsResponse, *Response, error)
Remove(context.Context, *RemoveTagsRequest) (*EmptyDataResponse, *Response, error)
AssignToProfiles(context.Context, *AssignTagsRequest) (*EmptyDataResponse, *Response, error)
Search(context.Context, *SearchTagsRequest) (*SearchTagsResponse, *Response, error)
}
TagsService manages tags.
type TagsServiceOp ¶
type TagsServiceOp struct {
// contains filtered or unexported fields
}
TagsServiceOp is the concrete TagsService implementation.
func (*TagsServiceOp) AssignToProfiles ¶
func (s *TagsServiceOp) AssignToProfiles(ctx context.Context, reqBody *AssignTagsRequest) (*EmptyDataResponse, *Response, error)
func (*TagsServiceOp) Create ¶
func (s *TagsServiceOp) Create(ctx context.Context, reqBody *CreateTagsRequest) (*TagsResponse, *Response, error)
func (*TagsServiceOp) Remove ¶
func (s *TagsServiceOp) Remove(ctx context.Context, reqBody *RemoveTagsRequest) (*EmptyDataResponse, *Response, error)
func (*TagsServiceOp) Search ¶
func (s *TagsServiceOp) Search(ctx context.Context, reqBody *SearchTagsRequest) (*SearchTagsResponse, *Response, error)
func (*TagsServiceOp) Update ¶
func (s *TagsServiceOp) Update(ctx context.Context, reqBody *UpdateTagsRequest) (*TagsResponse, *Response, error)
type TimeRangeFilter ¶
TimeRangeFilter is reused by search requests when needed later.
type TimezoneFingerprint ¶
type TimezoneFingerprint struct {
Zone string `json:"zone,omitempty"`
}
TimezoneFingerprint contains timezone settings.
type TransfersService ¶
type TransfersService interface {
Export(context.Context, string) (*ExportProfileResponse, *Response, error)
ExportStatus(context.Context, string) (*ExportStatusResponse, *Response, error)
WaitForExportDone(context.Context, string, PollOptions) (*ExportStatusResponse, *Response, error)
ExportStatuses(context.Context) (*ExportStatusesResponse, *Response, error)
Import(context.Context, *ImportProfileRequest) (*ImportProfileResponse, *Response, error)
ImportStatus(context.Context, string) (*ImportStatusResponse, *Response, error)
WaitForImportDone(context.Context, string, PollOptions) (*ImportStatusResponse, *Response, error)
ImportStatuses(context.Context) (*ImportStatusesResponse, *Response, error)
}
TransfersService manages import/export operations.
type TransfersServiceOp ¶
type TransfersServiceOp struct {
// contains filtered or unexported fields
}
TransfersServiceOp is the concrete import/export service.
func (*TransfersServiceOp) Export ¶
func (s *TransfersServiceOp) Export(ctx context.Context, profileID string) (*ExportProfileResponse, *Response, error)
func (*TransfersServiceOp) ExportStatus ¶
func (s *TransfersServiceOp) ExportStatus(ctx context.Context, exportID string) (*ExportStatusResponse, *Response, error)
func (*TransfersServiceOp) ExportStatuses ¶
func (s *TransfersServiceOp) ExportStatuses(ctx context.Context) (*ExportStatusesResponse, *Response, error)
func (*TransfersServiceOp) Import ¶
func (s *TransfersServiceOp) Import(ctx context.Context, reqBody *ImportProfileRequest) (*ImportProfileResponse, *Response, error)
func (*TransfersServiceOp) ImportStatus ¶
func (s *TransfersServiceOp) ImportStatus(ctx context.Context, importID string) (*ImportStatusResponse, *Response, error)
func (*TransfersServiceOp) ImportStatuses ¶
func (s *TransfersServiceOp) ImportStatuses(ctx context.Context) (*ImportStatusesResponse, *Response, error)
func (*TransfersServiceOp) WaitForExportDone ¶
func (s *TransfersServiceOp) WaitForExportDone(ctx context.Context, exportID string, opts PollOptions) (*ExportStatusResponse, *Response, error)
func (*TransfersServiceOp) WaitForImportDone ¶
func (s *TransfersServiceOp) WaitForImportDone(ctx context.Context, importID string, opts PollOptions) (*ImportStatusResponse, *Response, error)
type TransportError ¶
TransportError wraps network/transport failures from the underlying HTTP client.
func (*TransportError) Class ¶
func (e *TransportError) Class() ErrorClass
Class returns the typed transport error category.
func (*TransportError) Error ¶
func (e *TransportError) Error() string
func (*TransportError) Retryable ¶
func (e *TransportError) Retryable() bool
Retryable reports whether retry/backoff helpers should retry the transport error.
func (*TransportError) Temporary ¶
func (e *TransportError) Temporary() bool
Temporary reports whether the transport failure is likely transient.
func (*TransportError) Timeout ¶
func (e *TransportError) Timeout() bool
Timeout reports whether the wrapped transport failure is a timeout.
func (*TransportError) Unwrap ¶
func (e *TransportError) Unwrap() error
type UpdateCookiesMetadataRequest ¶
type UpdateCookiesMetadataRequest struct {
ProfileID string `json:"profile_id"`
TargetWebsite string `json:"target_website"`
AdditionalWebsite string `json:"additional_website,omitempty"`
StrictMode bool `json:"-"`
}
UpdateCookiesMetadataRequest changes cookie metadata for a profile.
type UpdateFolderRequest ¶
type UpdateFolderRequest struct {
FolderID string `json:"folder_id"`
Name string `json:"name"`
Comment string `json:"comment,omitempty"`
}
UpdateFolderRequest updates a folder.
type UpdateProfileRequest ¶
type UpdateProfileRequest struct {
ProfileID string `json:"profile_id"`
Name string `json:"name"`
AutoUpdateCore *bool `json:"auto_update_core,omitempty"`
CoreVersion int `json:"core_version,omitempty"`
CoreMinorVersion int `json:"core_minor_version,omitempty"`
Parameters *ProfileParameters `json:"parameters,omitempty"`
Notes string `json:"notes,omitempty"`
Tags []string `json:"tags,omitempty"`
}
UpdateProfileRequest fully updates a profile.
type UpdateTagItem ¶
type UpdateTagItem struct {
ID string `json:"id"`
Name string `json:"name"`
Color string `json:"color"`
}
UpdateTagItem is a single tag to update.
type UpdateTagsRequest ¶
type UpdateTagsRequest struct {
Tags []UpdateTagItem `json:"tags"`
}
UpdateTagsRequest updates tags.
type UploadExtensionRequest ¶
type UploadExtensionRequest struct {
ObjectPath string
StorageType string
ObjectMeta string
Encrypt *bool
}
UploadExtensionRequest uploads an extension archive as a resource object.
Live validation showed that applying a local zip extension to a local profile works reliably when the extension object reference is cloud-backed, so this helper defaults StorageType to "cloud".
type UploadObjectRequest ¶
type UploadObjectRequest struct {
ObjectTypeID string `json:"object_type_id"`
ObjectPath string `json:"object_path"`
StorageType string `json:"storage_type"`
ObjectMeta string `json:"object_meta,omitempty"`
Encrypt *bool `json:"encrypt,omitempty"`
}
UploadObjectRequest uploads an existing local object into launcher-backed storage.
type ValidateProxyRequest ¶
type ValidateProxyRequest struct {
Type string `json:"type"`
Host string `json:"host"`
Port int `json:"port"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
}
ValidateProxyRequest configures proxy validation.
type ValidateProxyResponse ¶
type ValidateProxyResponse struct {
Status Status `json:"status"`
Data ProxyValidationData `json:"data"`
}
ValidateProxyResponse contains proxy validation results.
func (*ValidateProxyResponse) GetStatus ¶
func (r *ValidateProxyResponse) GetStatus() Status
type VerifiedProfileWorkflowResult ¶
type VerifiedProfileWorkflowResult struct {
Profile *Profile
Meta *ProfileMeta
}
VerifiedProfileWorkflowResult contains lightweight and meta profile views.
type WebRTCFingerprint ¶
type WebRTCFingerprint struct {
PublicIP string `json:"public_ip,omitempty"`
}
WebRTCFingerprint contains WebRTC information.
type WorkflowService ¶
type WorkflowService interface {
CreateProfilesAndVerify(context.Context, *CreateProfileRequest, CreateProfilesAndVerifyOptions) (*CreatedProfilesWorkflowResult, error)
CreateLocalProfile(context.Context, *CreateProfileRequest, CreateProfilesAndVerifyOptions) (*CreatedProfilesWorkflowResult, error)
CreateCloudProfile(context.Context, *CreateProfileRequest, CreateProfilesAndVerifyOptions) (*CreatedProfilesWorkflowResult, error)
FindProfileByNameVerified(context.Context, string, FindProfileByNameVerifiedOptions) (*VerifiedProfileWorkflowResult, error)
StartProfileAutomationByName(context.Context, string, StartProfileAutomationByNameOptions) (*StartedProfileAutomationWorkflowResult, error)
StartProfileByName(context.Context, string, StartProfileByNameOptions) (*StartedProfileWorkflowResult, error)
StartProfilesByName(context.Context, []string, StartProfileByNameOptions) (*BatchResult[StartedProfileWorkflowResult], error)
StopProfileByName(context.Context, string, StopProfileByNameOptions) (*StoppedProfileWorkflowResult, error)
StopProfilesByName(context.Context, []string, StopProfileByNameOptions) (*BatchResult[StoppedProfileWorkflowResult], error)
ImportProfileAndVerify(context.Context, *ImportProfileRequest, ImportProfileWorkflowOptions) (*ImportedProfileWorkflowResult, error)
EnableExtensionForProfileByName(context.Context, string, string, EnableExtensionForProfileByNameOptions) (*EnabledExtensionWorkflowResult, error)
EnableExtensionForProfilesByName(context.Context, []string, string, EnableExtensionForProfileByNameOptions) (*BatchResult[EnabledExtensionWorkflowResult], error)
ExportProfileByNameToFolder(context.Context, string, ExportProfileByNameToFolderOptions) (*ExportedProfileWorkflowResult, error)
ExportProfilesByNameToFolder(context.Context, []string, ExportProfileByNameToFolderOptions) (*BatchResult[ExportedProfileWorkflowResult], error)
GenerateProfileProxyByName(context.Context, string, GenerateProfileProxyByNameOptions) (*GeneratedProfileProxyWorkflowResult, error)
}
WorkflowService provides higher-level helpers that combine multiple SDK calls.
type WorkflowServiceOp ¶
type WorkflowServiceOp struct {
// contains filtered or unexported fields
}
WorkflowServiceOp is the concrete high-level workflow service.
func (*WorkflowServiceOp) CreateCloudProfile ¶
func (s *WorkflowServiceOp) CreateCloudProfile(ctx context.Context, reqBody *CreateProfileRequest, opts CreateProfilesAndVerifyOptions) (*CreatedProfilesWorkflowResult, error)
CreateCloudProfile creates a cloud profile by ensuring storage.is_local=false and then verifying creation.
func (*WorkflowServiceOp) CreateLocalProfile ¶
func (s *WorkflowServiceOp) CreateLocalProfile(ctx context.Context, reqBody *CreateProfileRequest, opts CreateProfilesAndVerifyOptions) (*CreatedProfilesWorkflowResult, error)
CreateLocalProfile creates a local profile by ensuring storage.is_local=true and then verifying creation.
func (*WorkflowServiceOp) CreateProfilesAndVerify ¶
func (s *WorkflowServiceOp) CreateProfilesAndVerify(ctx context.Context, reqBody *CreateProfileRequest, opts CreateProfilesAndVerifyOptions) (*CreatedProfilesWorkflowResult, error)
CreateProfilesAndVerify creates profiles and waits until their metas are readable.
func (*WorkflowServiceOp) EnableExtensionForProfileByName ¶
func (s *WorkflowServiceOp) EnableExtensionForProfileByName(ctx context.Context, profileName, extensionID string, opts EnableExtensionForProfileByNameOptions) (*EnabledExtensionWorkflowResult, error)
EnableExtensionForProfileByName enables an extension and verifies the object-to-profile binding.
func (*WorkflowServiceOp) EnableExtensionForProfilesByName ¶
func (s *WorkflowServiceOp) EnableExtensionForProfilesByName(ctx context.Context, profileNames []string, extensionID string, opts EnableExtensionForProfileByNameOptions) (*BatchResult[EnabledExtensionWorkflowResult], error)
EnableExtensionForProfilesByName enables one extension across multiple profiles with aggregated failures.
func (*WorkflowServiceOp) ExportProfileByNameToFolder ¶
func (s *WorkflowServiceOp) ExportProfileByNameToFolder(ctx context.Context, profileName string, opts ExportProfileByNameToFolderOptions) (*ExportedProfileWorkflowResult, error)
ExportProfileByNameToFolder resolves a profile by exact name and exports it into an organized folder.
func (*WorkflowServiceOp) ExportProfilesByNameToFolder ¶
func (s *WorkflowServiceOp) ExportProfilesByNameToFolder(ctx context.Context, profileNames []string, opts ExportProfileByNameToFolderOptions) (*BatchResult[ExportedProfileWorkflowResult], error)
ExportProfilesByNameToFolder exports multiple profiles and aggregates per-profile failures.
func (*WorkflowServiceOp) FindProfileByNameVerified ¶
func (s *WorkflowServiceOp) FindProfileByNameVerified(ctx context.Context, profileName string, opts FindProfileByNameVerifiedOptions) (*VerifiedProfileWorkflowResult, error)
func (*WorkflowServiceOp) GenerateProfileProxyByName ¶
func (s *WorkflowServiceOp) GenerateProfileProxyByName(ctx context.Context, profileName string, opts GenerateProfileProxyByNameOptions) (*GeneratedProfileProxyWorkflowResult, error)
GenerateProfileProxyByName resolves a profile, generates an MLX-managed proxy, and optionally patches the profile.
func (*WorkflowServiceOp) ImportProfileAndVerify ¶
func (s *WorkflowServiceOp) ImportProfileAndVerify(ctx context.Context, reqBody *ImportProfileRequest, opts ImportProfileWorkflowOptions) (*ImportedProfileWorkflowResult, error)
ImportProfileAndVerify imports a profile archive and confirms the resulting profile meta is readable.
func (*WorkflowServiceOp) StartProfileAutomationByName ¶
func (s *WorkflowServiceOp) StartProfileAutomationByName(ctx context.Context, profileName string, opts StartProfileAutomationByNameOptions) (*StartedProfileAutomationWorkflowResult, error)
StartProfileAutomationByName resolves a profile by exact name, starts it with automation normalization, and returns resolved CDP endpoints.
func (*WorkflowServiceOp) StartProfileByName ¶
func (s *WorkflowServiceOp) StartProfileByName(ctx context.Context, profileName string, opts StartProfileByNameOptions) (*StartedProfileWorkflowResult, error)
StartProfileByName resolves a profile by exact name, starts it, and optionally waits for running status.
func (*WorkflowServiceOp) StartProfilesByName ¶
func (s *WorkflowServiceOp) StartProfilesByName(ctx context.Context, profileNames []string, opts StartProfileByNameOptions) (*BatchResult[StartedProfileWorkflowResult], error)
StartProfilesByName starts multiple profiles and aggregates per-profile failures.
func (*WorkflowServiceOp) StopProfileByName ¶
func (s *WorkflowServiceOp) StopProfileByName(ctx context.Context, profileName string, opts StopProfileByNameOptions) (*StoppedProfileWorkflowResult, error)
StopProfileByName resolves a profile by exact name and stops it.
func (*WorkflowServiceOp) StopProfilesByName ¶
func (s *WorkflowServiceOp) StopProfilesByName(ctx context.Context, profileNames []string, opts StopProfileByNameOptions) (*BatchResult[StoppedProfileWorkflowResult], error)
StopProfilesByName stops multiple profiles and aggregates per-profile failures.