Documentation
¶
Index ¶
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type AndroidInstance
- type AndroidInstanceListParams
- type AndroidInstanceListParamsState
- type AndroidInstanceMetadata
- type AndroidInstanceNewParams
- type AndroidInstanceNewParamsMetadata
- type AndroidInstanceNewParamsSpec
- type AndroidInstanceNewParamsSpecClue
- type AndroidInstanceNewParamsSpecInitialAsset
- type AndroidInstanceService
- func (r *AndroidInstanceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *AndroidInstanceService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AndroidInstance, err error)
- func (r *AndroidInstanceService) List(ctx context.Context, query AndroidInstanceListParams, ...) (res *[]AndroidInstance, err error)
- func (r *AndroidInstanceService) New(ctx context.Context, params AndroidInstanceNewParams, ...) (res *AndroidInstance, err error)
- type AndroidInstanceSpec
- type AndroidInstanceStatus
- type Asset
- type AssetGetOrNewParams
- type AssetGetOrNewResponse
- type AssetGetOrUploadParams
- type AssetGetParams
- type AssetListParams
- type AssetService
- func (r *AssetService) Get(ctx context.Context, assetID string, query AssetGetParams, ...) (res *Asset, err error)
- func (r *AssetService) GetOrNew(ctx context.Context, body AssetGetOrNewParams, opts ...option.RequestOption) (res *AssetGetOrNewResponse, err error)
- func (r *AssetService) GetOrUpload(ctx context.Context, body AssetGetOrUploadParams, opts ...option.RequestOption) (res *AssetGetOrNewResponse, err error)
- func (r *AssetService) List(ctx context.Context, query AssetListParams, opts ...option.RequestOption) (res *[]Asset, err error)
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type Error
- type IosInstance
- type IosInstanceListParams
- type IosInstanceListParamsState
- type IosInstanceMetadata
- type IosInstanceNewParams
- type IosInstanceNewParamsMetadata
- type IosInstanceNewParamsSpec
- type IosInstanceNewParamsSpecClue
- type IosInstanceNewParamsSpecInitialAsset
- type IosInstanceService
- func (r *IosInstanceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *IosInstanceService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *IosInstance, err error)
- func (r *IosInstanceService) List(ctx context.Context, query IosInstanceListParams, opts ...option.RequestOption) (res *[]IosInstance, err error)
- func (r *IosInstanceService) New(ctx context.Context, params IosInstanceNewParams, opts ...option.RequestOption) (res *IosInstance, err error)
- type IosInstanceSpec
- type IosInstanceStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (LIM_TOKEN, LIMRUN_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type AndroidInstance ¶
type AndroidInstance struct { Metadata AndroidInstanceMetadata `json:"metadata,required"` Spec AndroidInstanceSpec `json:"spec,required"` Status AndroidInstanceStatus `json:"status,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Metadata respjson.Field Spec respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (AndroidInstance) RawJSON ¶
func (r AndroidInstance) RawJSON() string
Returns the unmodified JSON received from the API
func (*AndroidInstance) UnmarshalJSON ¶
func (r *AndroidInstance) UnmarshalJSON(data []byte) error
type AndroidInstanceListParams ¶
type AndroidInstanceListParams struct { // Labels filter to apply to Android instances to return. Expects a comma-separated // list of key=value pairs (e.g., env=prod,region=us-west). LabelSelector param.Opt[string] `query:"labelSelector,omitzero" json:"-"` // Region where the instance is scheduled on. Region param.Opt[string] `query:"region,omitzero" json:"-"` // State filter to apply to Android instances to return. // // Any of "unknown", "creating", "ready", "terminated". State AndroidInstanceListParamsState `query:"state,omitzero" json:"-"` // contains filtered or unexported fields }
func (AndroidInstanceListParams) URLQuery ¶
func (r AndroidInstanceListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AndroidInstanceListParams's query parameters as `url.Values`.
type AndroidInstanceListParamsState ¶
type AndroidInstanceListParamsState string
State filter to apply to Android instances to return.
const ( AndroidInstanceListParamsStateUnknown AndroidInstanceListParamsState = "unknown" AndroidInstanceListParamsStateCreating AndroidInstanceListParamsState = "creating" AndroidInstanceListParamsStateReady AndroidInstanceListParamsState = "ready" AndroidInstanceListParamsStateTerminated AndroidInstanceListParamsState = "terminated" )
type AndroidInstanceMetadata ¶
type AndroidInstanceMetadata struct { ID string `json:"id,required"` CreatedAt time.Time `json:"createdAt,required" format:"date-time"` OrganizationID string `json:"organizationId,required"` DisplayName string `json:"displayName"` Labels map[string]string `json:"labels"` TerminatedAt time.Time `json:"terminatedAt" format:"date-time"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field CreatedAt respjson.Field OrganizationID respjson.Field DisplayName respjson.Field Labels respjson.Field TerminatedAt respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (AndroidInstanceMetadata) RawJSON ¶
func (r AndroidInstanceMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*AndroidInstanceMetadata) UnmarshalJSON ¶
func (r *AndroidInstanceMetadata) UnmarshalJSON(data []byte) error
type AndroidInstanceNewParams ¶
type AndroidInstanceNewParams struct { // Return after the instance is ready to connect. Wait param.Opt[bool] `query:"wait,omitzero" json:"-"` Metadata AndroidInstanceNewParamsMetadata `json:"metadata,omitzero"` Spec AndroidInstanceNewParamsSpec `json:"spec,omitzero"` // contains filtered or unexported fields }
func (AndroidInstanceNewParams) MarshalJSON ¶
func (r AndroidInstanceNewParams) MarshalJSON() (data []byte, err error)
func (AndroidInstanceNewParams) URLQuery ¶
func (r AndroidInstanceNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes AndroidInstanceNewParams's query parameters as `url.Values`.
func (*AndroidInstanceNewParams) UnmarshalJSON ¶
func (r *AndroidInstanceNewParams) UnmarshalJSON(data []byte) error
type AndroidInstanceNewParamsMetadata ¶
type AndroidInstanceNewParamsMetadata struct { DisplayName param.Opt[string] `json:"displayName,omitzero"` Labels map[string]string `json:"labels,omitzero"` // contains filtered or unexported fields }
func (AndroidInstanceNewParamsMetadata) MarshalJSON ¶
func (r AndroidInstanceNewParamsMetadata) MarshalJSON() (data []byte, err error)
func (*AndroidInstanceNewParamsMetadata) UnmarshalJSON ¶
func (r *AndroidInstanceNewParamsMetadata) UnmarshalJSON(data []byte) error
type AndroidInstanceNewParamsSpec ¶
type AndroidInstanceNewParamsSpec struct { // After how many minutes should the instance be terminated. Example values 1m, // 10m, 3h. Default is "0" which means no hard timeout. HardTimeout param.Opt[string] `json:"hardTimeout,omitzero" format:"duration"` // After how many minutes of inactivity should the instance be terminated. Example // values 1m, 10m, 3h. Default is 3m. Providing "0" disables inactivity checks // altogether. InactivityTimeout param.Opt[string] `json:"inactivityTimeout,omitzero" format:"duration"` // The region where the instance will be created. If not given, will be decided // based on scheduling clues and availability. Region param.Opt[string] `json:"region,omitzero"` Clues []AndroidInstanceNewParamsSpecClue `json:"clues,omitzero"` InitialAssets []AndroidInstanceNewParamsSpecInitialAsset `json:"initialAssets,omitzero"` // contains filtered or unexported fields }
func (AndroidInstanceNewParamsSpec) MarshalJSON ¶
func (r AndroidInstanceNewParamsSpec) MarshalJSON() (data []byte, err error)
func (*AndroidInstanceNewParamsSpec) UnmarshalJSON ¶
func (r *AndroidInstanceNewParamsSpec) UnmarshalJSON(data []byte) error
type AndroidInstanceNewParamsSpecClue ¶
type AndroidInstanceNewParamsSpecClue struct { // Any of "ClientIP". Kind string `json:"kind,omitzero,required"` ClientIP param.Opt[string] `json:"clientIp,omitzero"` // contains filtered or unexported fields }
The property Kind is required.
func (AndroidInstanceNewParamsSpecClue) MarshalJSON ¶
func (r AndroidInstanceNewParamsSpecClue) MarshalJSON() (data []byte, err error)
func (*AndroidInstanceNewParamsSpecClue) UnmarshalJSON ¶
func (r *AndroidInstanceNewParamsSpecClue) UnmarshalJSON(data []byte) error
type AndroidInstanceNewParamsSpecInitialAsset ¶
type AndroidInstanceNewParamsSpecInitialAsset struct { // Any of "App". Kind string `json:"kind,omitzero,required"` // Any of "URL", "AssetName". Source string `json:"source,omitzero,required"` AssetName param.Opt[string] `json:"assetName,omitzero"` URL param.Opt[string] `json:"url,omitzero"` // contains filtered or unexported fields }
The properties Kind, Source are required.
func (AndroidInstanceNewParamsSpecInitialAsset) MarshalJSON ¶
func (r AndroidInstanceNewParamsSpecInitialAsset) MarshalJSON() (data []byte, err error)
func (*AndroidInstanceNewParamsSpecInitialAsset) UnmarshalJSON ¶
func (r *AndroidInstanceNewParamsSpecInitialAsset) UnmarshalJSON(data []byte) error
type AndroidInstanceService ¶
type AndroidInstanceService struct {
Options []option.RequestOption
}
AndroidInstanceService contains methods and other services that help with interacting with the limrun API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAndroidInstanceService method instead.
func NewAndroidInstanceService ¶
func NewAndroidInstanceService(opts ...option.RequestOption) (r AndroidInstanceService)
NewAndroidInstanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AndroidInstanceService) Delete ¶
func (r *AndroidInstanceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete Android instance with given name
func (*AndroidInstanceService) Get ¶
func (r *AndroidInstanceService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AndroidInstance, err error)
Get Android instance with given ID
func (*AndroidInstanceService) List ¶
func (r *AndroidInstanceService) List(ctx context.Context, query AndroidInstanceListParams, opts ...option.RequestOption) (res *[]AndroidInstance, err error)
List Android instances belonging to given organization
func (*AndroidInstanceService) New ¶
func (r *AndroidInstanceService) New(ctx context.Context, params AndroidInstanceNewParams, opts ...option.RequestOption) (res *AndroidInstance, err error)
Create an Android instance
type AndroidInstanceSpec ¶
type AndroidInstanceSpec struct { // After how many minutes of inactivity should the instance be terminated. Example // values 1m, 10m, 3h. Default is 3m. Providing "0" disables inactivity checks // altogether. InactivityTimeout string `json:"inactivityTimeout,required" format:"duration"` // The region where the instance will be created. If not given, will be decided // based on scheduling clues and availability. Region string `json:"region,required"` // After how many minutes should the instance be terminated. Example values 1m, // 10m, 3h. Default is "0" which means no hard timeout. HardTimeout string `json:"hardTimeout" format:"duration"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { InactivityTimeout respjson.Field Region respjson.Field HardTimeout respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (AndroidInstanceSpec) RawJSON ¶
func (r AndroidInstanceSpec) RawJSON() string
Returns the unmodified JSON received from the API
func (*AndroidInstanceSpec) UnmarshalJSON ¶
func (r *AndroidInstanceSpec) UnmarshalJSON(data []byte) error
type AndroidInstanceStatus ¶
type AndroidInstanceStatus struct { Token string `json:"token,required"` // Any of "unknown", "creating", "ready", "terminated". State string `json:"state,required"` AdbWebSocketURL string `json:"adbWebSocketUrl"` EndpointWebSocketURL string `json:"endpointWebSocketUrl"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field State respjson.Field AdbWebSocketURL respjson.Field EndpointWebSocketURL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (AndroidInstanceStatus) RawJSON ¶
func (r AndroidInstanceStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*AndroidInstanceStatus) UnmarshalJSON ¶
func (r *AndroidInstanceStatus) UnmarshalJSON(data []byte) error
type Asset ¶
type Asset struct { ID string `json:"id,required"` Name string `json:"name,required"` // Returned only if there is a corresponding file uploaded already. Md5 string `json:"md5"` SignedDownloadURL string `json:"signedDownloadUrl"` SignedUploadURL string `json:"signedUploadUrl"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Name respjson.Field Md5 respjson.Field SignedDownloadURL respjson.Field SignedUploadURL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (*Asset) UnmarshalJSON ¶
type AssetGetOrNewParams ¶
type AssetGetOrNewParams struct { Name string `json:"name,required"` // contains filtered or unexported fields }
func (AssetGetOrNewParams) MarshalJSON ¶
func (r AssetGetOrNewParams) MarshalJSON() (data []byte, err error)
func (*AssetGetOrNewParams) UnmarshalJSON ¶
func (r *AssetGetOrNewParams) UnmarshalJSON(data []byte) error
type AssetGetOrNewResponse ¶
type AssetGetOrNewResponse struct { ID string `json:"id,required"` Name string `json:"name,required"` SignedDownloadURL string `json:"signedDownloadUrl,required"` SignedUploadURL string `json:"signedUploadUrl,required"` // Returned only if there is a corresponding file uploaded already. Md5 string `json:"md5"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field Name respjson.Field SignedDownloadURL respjson.Field SignedUploadURL respjson.Field Md5 respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (AssetGetOrNewResponse) RawJSON ¶
func (r AssetGetOrNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AssetGetOrNewResponse) UnmarshalJSON ¶
func (r *AssetGetOrNewResponse) UnmarshalJSON(data []byte) error
type AssetGetOrUploadParams ¶
type AssetGetOrUploadParams struct { // Name of the asset. If not given, file name of the given file is used. Name param.Opt[string] // Path to the file to upload. Path string // ProgressWriter is an optional io.Writer to track upload progress. // If provided, upload progress will be written to this writer. ProgressWriter io.Writer }
type AssetGetParams ¶
type AssetGetParams struct { // Toggles whether a download URL should be included in the response IncludeDownloadURL param.Opt[bool] `query:"includeDownloadUrl,omitzero" json:"-"` // Toggles whether an upload URL should be included in the response IncludeUploadURL param.Opt[bool] `query:"includeUploadUrl,omitzero" json:"-"` // contains filtered or unexported fields }
func (AssetGetParams) URLQuery ¶
func (r AssetGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes AssetGetParams's query parameters as `url.Values`.
type AssetListParams ¶
type AssetListParams struct { // Toggles whether a download URL should be included in the response IncludeDownloadURL param.Opt[bool] `query:"includeDownloadUrl,omitzero" json:"-"` // Toggles whether an upload URL should be included in the response IncludeUploadURL param.Opt[bool] `query:"includeUploadUrl,omitzero" json:"-"` // Query by file name NameFilter param.Opt[string] `query:"nameFilter,omitzero" json:"-"` // contains filtered or unexported fields }
func (AssetListParams) URLQuery ¶
func (r AssetListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AssetListParams's query parameters as `url.Values`.
type AssetService ¶
type AssetService struct {
Options []option.RequestOption
}
AssetService contains methods and other services that help with interacting with the limrun API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetService method instead.
func NewAssetService ¶
func NewAssetService(opts ...option.RequestOption) (r AssetService)
NewAssetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AssetService) Get ¶
func (r *AssetService) Get(ctx context.Context, assetID string, query AssetGetParams, opts ...option.RequestOption) (res *Asset, err error)
Get the asset with given ID.
func (*AssetService) GetOrNew ¶
func (r *AssetService) GetOrNew(ctx context.Context, body AssetGetOrNewParams, opts ...option.RequestOption) (res *AssetGetOrNewResponse, err error)
Creates an asset and returns upload and download URLs. If there is a corresponding file uploaded in the storage with given name, its MD5 is returned so you can check if a re-upload is necessary. If no MD5 is returned, then there is no corresponding file in the storage so downloading it directly or using it in instances will fail until you use the returned upload URL to submit the file.
func (*AssetService) GetOrUpload ¶
func (r *AssetService) GetOrUpload(ctx context.Context, body AssetGetOrUploadParams, opts ...option.RequestOption) (res *AssetGetOrNewResponse, err error)
GetOrUpload makes sure the given file is either uploaded or validates that it was uploaded and return a working download URL in either case.
func (*AssetService) List ¶
func (r *AssetService) List(ctx context.Context, query AssetListParams, opts ...option.RequestOption) (res *[]Asset, err error)
List organization's all assets with given filters. If none given, return all assets.
type Client ¶
type Client struct { Options []option.RequestOption AndroidInstances AndroidInstanceService Assets AssetService IosInstances IosInstanceService }
Client creates a struct with services and top level methods that help with interacting with the limrun API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (LIM_TOKEN, LIMRUN_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type IosInstance ¶ added in v0.4.1
type IosInstance struct { Metadata IosInstanceMetadata `json:"metadata,required"` Spec IosInstanceSpec `json:"spec,required"` Status IosInstanceStatus `json:"status,required"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Metadata respjson.Field Spec respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (IosInstance) RawJSON ¶ added in v0.4.1
func (r IosInstance) RawJSON() string
Returns the unmodified JSON received from the API
func (*IosInstance) UnmarshalJSON ¶ added in v0.4.1
func (r *IosInstance) UnmarshalJSON(data []byte) error
type IosInstanceListParams ¶ added in v0.4.1
type IosInstanceListParams struct { // Labels filter to apply to instances to return. Expects a comma-separated list of // key=value pairs (e.g., env=prod,region=us-west). LabelSelector param.Opt[string] `query:"labelSelector,omitzero" json:"-"` // Region where the instance is scheduled on. Region param.Opt[string] `query:"region,omitzero" json:"-"` // State filter to apply to instances to return. // // Any of "unknown", "creating", "ready", "terminated". State IosInstanceListParamsState `query:"state,omitzero" json:"-"` // contains filtered or unexported fields }
func (IosInstanceListParams) URLQuery ¶ added in v0.4.1
func (r IosInstanceListParams) URLQuery() (v url.Values, err error)
URLQuery serializes IosInstanceListParams's query parameters as `url.Values`.
type IosInstanceListParamsState ¶ added in v0.4.1
type IosInstanceListParamsState string
State filter to apply to instances to return.
const ( IosInstanceListParamsStateUnknown IosInstanceListParamsState = "unknown" IosInstanceListParamsStateCreating IosInstanceListParamsState = "creating" IosInstanceListParamsStateReady IosInstanceListParamsState = "ready" IosInstanceListParamsStateTerminated IosInstanceListParamsState = "terminated" )
type IosInstanceMetadata ¶ added in v0.4.1
type IosInstanceMetadata struct { ID string `json:"id,required"` CreatedAt time.Time `json:"createdAt,required" format:"date-time"` OrganizationID string `json:"organizationId,required"` DisplayName string `json:"displayName"` Labels map[string]string `json:"labels"` TerminatedAt time.Time `json:"terminatedAt" format:"date-time"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { ID respjson.Field CreatedAt respjson.Field OrganizationID respjson.Field DisplayName respjson.Field Labels respjson.Field TerminatedAt respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (IosInstanceMetadata) RawJSON ¶ added in v0.4.1
func (r IosInstanceMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*IosInstanceMetadata) UnmarshalJSON ¶ added in v0.4.1
func (r *IosInstanceMetadata) UnmarshalJSON(data []byte) error
type IosInstanceNewParams ¶ added in v0.4.1
type IosInstanceNewParams struct { // Return after the instance is ready to connect. Wait param.Opt[bool] `query:"wait,omitzero" json:"-"` Metadata IosInstanceNewParamsMetadata `json:"metadata,omitzero"` Spec IosInstanceNewParamsSpec `json:"spec,omitzero"` // contains filtered or unexported fields }
func (IosInstanceNewParams) MarshalJSON ¶ added in v0.4.1
func (r IosInstanceNewParams) MarshalJSON() (data []byte, err error)
func (IosInstanceNewParams) URLQuery ¶ added in v0.4.1
func (r IosInstanceNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes IosInstanceNewParams's query parameters as `url.Values`.
func (*IosInstanceNewParams) UnmarshalJSON ¶ added in v0.4.1
func (r *IosInstanceNewParams) UnmarshalJSON(data []byte) error
type IosInstanceNewParamsMetadata ¶ added in v0.4.1
type IosInstanceNewParamsMetadata struct { DisplayName param.Opt[string] `json:"displayName,omitzero"` Labels map[string]string `json:"labels,omitzero"` // contains filtered or unexported fields }
func (IosInstanceNewParamsMetadata) MarshalJSON ¶ added in v0.4.1
func (r IosInstanceNewParamsMetadata) MarshalJSON() (data []byte, err error)
func (*IosInstanceNewParamsMetadata) UnmarshalJSON ¶ added in v0.4.1
func (r *IosInstanceNewParamsMetadata) UnmarshalJSON(data []byte) error
type IosInstanceNewParamsSpec ¶ added in v0.4.1
type IosInstanceNewParamsSpec struct { // After how many minutes should the instance be terminated. Example values 1m, // 10m, 3h. Default is "0" which means no hard timeout. HardTimeout param.Opt[string] `json:"hardTimeout,omitzero" format:"duration"` // After how many minutes of inactivity should the instance be terminated. Example // values 1m, 10m, 3h. Default is 3m. Providing "0" disables inactivity checks // altogether. InactivityTimeout param.Opt[string] `json:"inactivityTimeout,omitzero" format:"duration"` // The region where the instance will be created. If not given, will be decided // based on scheduling clues and availability. Region param.Opt[string] `json:"region,omitzero"` Clues []IosInstanceNewParamsSpecClue `json:"clues,omitzero"` InitialAssets []IosInstanceNewParamsSpecInitialAsset `json:"initialAssets,omitzero"` // contains filtered or unexported fields }
func (IosInstanceNewParamsSpec) MarshalJSON ¶ added in v0.4.1
func (r IosInstanceNewParamsSpec) MarshalJSON() (data []byte, err error)
func (*IosInstanceNewParamsSpec) UnmarshalJSON ¶ added in v0.4.1
func (r *IosInstanceNewParamsSpec) UnmarshalJSON(data []byte) error
type IosInstanceNewParamsSpecClue ¶ added in v0.4.1
type IosInstanceNewParamsSpecClue struct { // Any of "ClientIP". Kind string `json:"kind,omitzero,required"` ClientIP param.Opt[string] `json:"clientIp,omitzero"` // contains filtered or unexported fields }
The property Kind is required.
func (IosInstanceNewParamsSpecClue) MarshalJSON ¶ added in v0.4.1
func (r IosInstanceNewParamsSpecClue) MarshalJSON() (data []byte, err error)
func (*IosInstanceNewParamsSpecClue) UnmarshalJSON ¶ added in v0.4.1
func (r *IosInstanceNewParamsSpecClue) UnmarshalJSON(data []byte) error
type IosInstanceNewParamsSpecInitialAsset ¶ added in v0.4.1
type IosInstanceNewParamsSpecInitialAsset struct { // Any of "App". Kind string `json:"kind,omitzero,required"` // Any of "URL", "AssetName". Source string `json:"source,omitzero,required"` AssetName param.Opt[string] `json:"assetName,omitzero"` URL param.Opt[string] `json:"url,omitzero"` // contains filtered or unexported fields }
The properties Kind, Source are required.
func (IosInstanceNewParamsSpecInitialAsset) MarshalJSON ¶ added in v0.4.1
func (r IosInstanceNewParamsSpecInitialAsset) MarshalJSON() (data []byte, err error)
func (*IosInstanceNewParamsSpecInitialAsset) UnmarshalJSON ¶ added in v0.4.1
func (r *IosInstanceNewParamsSpecInitialAsset) UnmarshalJSON(data []byte) error
type IosInstanceService ¶ added in v0.4.1
type IosInstanceService struct {
Options []option.RequestOption
}
IosInstanceService contains methods and other services that help with interacting with the limrun API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIosInstanceService method instead.
func NewIosInstanceService ¶ added in v0.4.1
func NewIosInstanceService(opts ...option.RequestOption) (r IosInstanceService)
NewIosInstanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IosInstanceService) Delete ¶ added in v0.4.1
func (r *IosInstanceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Delete iOS instance with given name
func (*IosInstanceService) Get ¶ added in v0.4.1
func (r *IosInstanceService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *IosInstance, err error)
Get iOS instance with given ID
func (*IosInstanceService) List ¶ added in v0.4.1
func (r *IosInstanceService) List(ctx context.Context, query IosInstanceListParams, opts ...option.RequestOption) (res *[]IosInstance, err error)
List iOS instances
func (*IosInstanceService) New ¶ added in v0.4.1
func (r *IosInstanceService) New(ctx context.Context, params IosInstanceNewParams, opts ...option.RequestOption) (res *IosInstance, err error)
Create an iOS instance
type IosInstanceSpec ¶ added in v0.4.1
type IosInstanceSpec struct { // After how many minutes of inactivity should the instance be terminated. Example // values 1m, 10m, 3h. Default is 3m. Providing "0" disables inactivity checks // altogether. InactivityTimeout string `json:"inactivityTimeout,required" format:"duration"` // The region where the instance will be created. If not given, will be decided // based on scheduling clues and availability. Region string `json:"region,required"` // After how many minutes should the instance be terminated. Example values 1m, // 10m, 3h. Default is "0" which means no hard timeout. HardTimeout string `json:"hardTimeout" format:"duration"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { InactivityTimeout respjson.Field Region respjson.Field HardTimeout respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (IosInstanceSpec) RawJSON ¶ added in v0.4.1
func (r IosInstanceSpec) RawJSON() string
Returns the unmodified JSON received from the API
func (*IosInstanceSpec) UnmarshalJSON ¶ added in v0.4.1
func (r *IosInstanceSpec) UnmarshalJSON(data []byte) error
type IosInstanceStatus ¶ added in v0.4.1
type IosInstanceStatus struct { Token string `json:"token,required"` // Any of "unknown", "creating", "ready", "terminated". State string `json:"state,required"` EndpointWebSocketURL string `json:"endpointWebSocketUrl"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Token respjson.Field State respjson.Field EndpointWebSocketURL respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (IosInstanceStatus) RawJSON ¶ added in v0.4.1
func (r IosInstanceStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*IosInstanceStatus) UnmarshalJSON ¶ added in v0.4.1
func (r *IosInstanceStatus) UnmarshalJSON(data []byte) error
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
examples
|
|
assets
command
|
|
server
command
|
|
tunnel
command
|
|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.21, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.21, and used by the Go 1.24 encoding/json package. |
packages
|
|
shared
|
|