config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents a client for 'config' requests.

func NewClient added in v1.0.0

func NewClient(c *api.Client) *Client

NewConfig returns a new 'config' client.

func (*Client) CreateProfile

func (c *Client) CreateProfile(params *CreateProfileParams) (*CreateProfileResponse, error)

Creates a new profile, switching to it in the process

func (*Client) CreateSceneCollection

func (c *Client) CreateSceneCollection(params *CreateSceneCollectionParams) (*CreateSceneCollectionResponse, error)

Creates a new scene collection, switching to it in the process.

Note: This will block until the collection has finished changing.

func (*Client) GetPersistentData

func (c *Client) GetPersistentData(params *GetPersistentDataParams) (*GetPersistentDataResponse, error)

Gets the value of a "slot" from the selected persistent data realm.

func (*Client) GetProfileList

func (c *Client) GetProfileList(paramss ...*GetProfileListParams) (*GetProfileListResponse, error)

Gets an array of all profiles

func (*Client) GetProfileParameter

func (c *Client) GetProfileParameter(params *GetProfileParameterParams) (*GetProfileParameterResponse, error)

Gets a parameter from the current profile's configuration.

func (*Client) GetRecordDirectory added in v0.11.0

func (c *Client) GetRecordDirectory(paramss ...*GetRecordDirectoryParams) (*GetRecordDirectoryResponse, error)

Gets the current directory that the record output is set to.

func (*Client) GetSceneCollectionList

func (c *Client) GetSceneCollectionList(
	paramss ...*GetSceneCollectionListParams,
) (*GetSceneCollectionListResponse, error)

Gets an array of all scene collections

func (*Client) GetStreamServiceSettings

func (c *Client) GetStreamServiceSettings(
	paramss ...*GetStreamServiceSettingsParams,
) (*GetStreamServiceSettingsResponse, error)

Gets the current stream service settings (stream destination).

func (*Client) GetVideoSettings

func (c *Client) GetVideoSettings(paramss ...*GetVideoSettingsParams) (*GetVideoSettingsResponse, error)

Gets the current video settings.

Note: To get the true FPS value, divide the FPS numerator by the FPS denominator. Example: `60000/1001`

func (*Client) RemoveProfile

func (c *Client) RemoveProfile(params *RemoveProfileParams) (*RemoveProfileResponse, error)

Removes a profile. If the current profile is chosen, it will change to a different profile first.

func (*Client) SetCurrentProfile

func (c *Client) SetCurrentProfile(params *SetCurrentProfileParams) (*SetCurrentProfileResponse, error)

Switches to a profile.

func (*Client) SetCurrentSceneCollection

func (c *Client) SetCurrentSceneCollection(
	params *SetCurrentSceneCollectionParams,
) (*SetCurrentSceneCollectionResponse, error)

Switches to a scene collection.

Note: This will block until the collection has finished changing.

func (*Client) SetPersistentData

func (c *Client) SetPersistentData(params *SetPersistentDataParams) (*SetPersistentDataResponse, error)

Sets the value of a "slot" from the selected persistent data realm.

func (*Client) SetProfileParameter

func (c *Client) SetProfileParameter(params *SetProfileParameterParams) (*SetProfileParameterResponse, error)

Sets the value of a parameter in the current profile's configuration.

func (*Client) SetRecordDirectory added in v1.1.0

func (c *Client) SetRecordDirectory(params *SetRecordDirectoryParams) (*SetRecordDirectoryResponse, error)

Sets the current directory that the record output writes files to.

func (*Client) SetStreamServiceSettings

func (c *Client) SetStreamServiceSettings(
	params *SetStreamServiceSettingsParams,
) (*SetStreamServiceSettingsResponse, error)

Sets the current stream service settings (stream destination).

Note: Simple RTMP settings can be set with type `rtmp_custom` and the settings fields `server` and `key`.

func (*Client) SetVideoSettings

func (c *Client) SetVideoSettings(paramss ...*SetVideoSettingsParams) (*SetVideoSettingsResponse, error)

Sets the current video settings.

Note: Fields must be specified in pairs. For example, you cannot set only `baseWidth` without needing to specify `baseHeight`.

type CreateProfileParams

type CreateProfileParams struct {
	// Name for the new profile
	ProfileName *string `json:"profileName,omitempty"`
}

Represents the request body for the CreateProfile request.

func NewCreateProfileParams added in v1.0.0

func NewCreateProfileParams() *CreateProfileParams

func (*CreateProfileParams) GetRequestName

func (o *CreateProfileParams) GetRequestName() string

Returns the associated request.

func (*CreateProfileParams) WithProfileName added in v1.0.0

func (o *CreateProfileParams) WithProfileName(x string) *CreateProfileParams

type CreateProfileResponse

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

Represents the response body for the CreateProfile request.

type CreateSceneCollectionParams

type CreateSceneCollectionParams struct {
	// Name for the new scene collection
	SceneCollectionName *string `json:"sceneCollectionName,omitempty"`
}

Represents the request body for the CreateSceneCollection request.

func NewCreateSceneCollectionParams added in v1.0.0

func NewCreateSceneCollectionParams() *CreateSceneCollectionParams

func (*CreateSceneCollectionParams) GetRequestName

func (o *CreateSceneCollectionParams) GetRequestName() string

Returns the associated request.

func (*CreateSceneCollectionParams) WithSceneCollectionName added in v1.0.0

func (o *CreateSceneCollectionParams) WithSceneCollectionName(x string) *CreateSceneCollectionParams

type CreateSceneCollectionResponse

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

Represents the response body for the CreateSceneCollection request.

type GetPersistentDataParams

type GetPersistentDataParams struct {
	// The data realm to select. `OBS_WEBSOCKET_DATA_REALM_GLOBAL` or `OBS_WEBSOCKET_DATA_REALM_PROFILE`
	Realm *string `json:"realm,omitempty"`

	// The name of the slot to retrieve data from
	SlotName *string `json:"slotName,omitempty"`
}

Represents the request body for the GetPersistentData request.

func NewGetPersistentDataParams added in v1.0.0

func NewGetPersistentDataParams() *GetPersistentDataParams

func (*GetPersistentDataParams) GetRequestName

func (o *GetPersistentDataParams) GetRequestName() string

Returns the associated request.

func (*GetPersistentDataParams) WithRealm added in v1.0.0

func (*GetPersistentDataParams) WithSlotName added in v1.0.0

type GetPersistentDataResponse

type GetPersistentDataResponse struct {

	// Value associated with the slot. `null` if not set
	SlotValue any `json:"slotValue,omitempty"`
	// contains filtered or unexported fields
}

Represents the response body for the GetPersistentData request.

type GetProfileListParams

type GetProfileListParams struct{}

Represents the request body for the GetProfileList request.

func (*GetProfileListParams) GetRequestName

func (o *GetProfileListParams) GetRequestName() string

Returns the associated request.

type GetProfileListResponse

type GetProfileListResponse struct {

	// The name of the current profile
	CurrentProfileName string `json:"currentProfileName,omitempty"`

	// Array of all available profiles
	Profiles []string `json:"profiles,omitempty"`
	// contains filtered or unexported fields
}

Represents the response body for the GetProfileList request.

type GetProfileParameterParams

type GetProfileParameterParams struct {
	// Category of the parameter to get
	ParameterCategory *string `json:"parameterCategory,omitempty"`

	// Name of the parameter to get
	ParameterName *string `json:"parameterName,omitempty"`
}

Represents the request body for the GetProfileParameter request.

func NewGetProfileParameterParams added in v1.0.0

func NewGetProfileParameterParams() *GetProfileParameterParams

func (*GetProfileParameterParams) GetRequestName

func (o *GetProfileParameterParams) GetRequestName() string

Returns the associated request.

func (*GetProfileParameterParams) WithParameterCategory added in v1.0.0

func (o *GetProfileParameterParams) WithParameterCategory(x string) *GetProfileParameterParams

func (*GetProfileParameterParams) WithParameterName added in v1.0.0

type GetProfileParameterResponse

type GetProfileParameterResponse struct {

	// Default value associated with the parameter. `null` if no default
	DefaultParameterValue string `json:"defaultParameterValue,omitempty"`

	// Value associated with the parameter. `null` if not set and no default
	ParameterValue string `json:"parameterValue,omitempty"`
	// contains filtered or unexported fields
}

Represents the response body for the GetProfileParameter request.

type GetRecordDirectoryParams added in v0.11.0

type GetRecordDirectoryParams struct{}

Represents the request body for the GetRecordDirectory request.

func (*GetRecordDirectoryParams) GetRequestName added in v0.11.0

func (o *GetRecordDirectoryParams) GetRequestName() string

Returns the associated request.

type GetRecordDirectoryResponse added in v0.11.0

type GetRecordDirectoryResponse struct {

	// Output directory
	RecordDirectory string `json:"recordDirectory,omitempty"`
	// contains filtered or unexported fields
}

Represents the response body for the GetRecordDirectory request.

type GetSceneCollectionListParams

type GetSceneCollectionListParams struct{}

Represents the request body for the GetSceneCollectionList request.

func (*GetSceneCollectionListParams) GetRequestName

func (o *GetSceneCollectionListParams) GetRequestName() string

Returns the associated request.

type GetSceneCollectionListResponse

type GetSceneCollectionListResponse struct {

	// The name of the current scene collection
	CurrentSceneCollectionName string `json:"currentSceneCollectionName,omitempty"`

	// Array of all available scene collections
	SceneCollections []string `json:"sceneCollections,omitempty"`
	// contains filtered or unexported fields
}

Represents the response body for the GetSceneCollectionList request.

type GetStreamServiceSettingsParams

type GetStreamServiceSettingsParams struct{}

Represents the request body for the GetStreamServiceSettings request.

func (*GetStreamServiceSettingsParams) GetRequestName

func (o *GetStreamServiceSettingsParams) GetRequestName() string

Returns the associated request.

type GetStreamServiceSettingsResponse

type GetStreamServiceSettingsResponse struct {

	// Stream service settings
	StreamServiceSettings *typedefs.StreamServiceSettings `json:"streamServiceSettings,omitempty"`

	// Stream service type, like `rtmp_custom` or `rtmp_common`
	StreamServiceType string `json:"streamServiceType,omitempty"`
	// contains filtered or unexported fields
}

Represents the response body for the GetStreamServiceSettings request.

type GetVideoSettingsParams

type GetVideoSettingsParams struct{}

Represents the request body for the GetVideoSettings request.

func (*GetVideoSettingsParams) GetRequestName

func (o *GetVideoSettingsParams) GetRequestName() string

Returns the associated request.

type GetVideoSettingsResponse

type GetVideoSettingsResponse struct {

	// Height of the base (canvas) resolution in pixels
	BaseHeight float64 `json:"baseHeight,omitempty"`

	// Width of the base (canvas) resolution in pixels
	BaseWidth float64 `json:"baseWidth,omitempty"`

	// Denominator of the fractional FPS value
	FpsDenominator float64 `json:"fpsDenominator,omitempty"`

	// Numerator of the fractional FPS value
	FpsNumerator float64 `json:"fpsNumerator,omitempty"`

	// Height of the output resolution in pixels
	OutputHeight float64 `json:"outputHeight,omitempty"`

	// Width of the output resolution in pixels
	OutputWidth float64 `json:"outputWidth,omitempty"`
	// contains filtered or unexported fields
}

Represents the response body for the GetVideoSettings request.

type RemoveProfileParams

type RemoveProfileParams struct {
	// Name of the profile to remove
	ProfileName *string `json:"profileName,omitempty"`
}

Represents the request body for the RemoveProfile request.

func NewRemoveProfileParams added in v1.0.0

func NewRemoveProfileParams() *RemoveProfileParams

func (*RemoveProfileParams) GetRequestName

func (o *RemoveProfileParams) GetRequestName() string

Returns the associated request.

func (*RemoveProfileParams) WithProfileName added in v1.0.0

func (o *RemoveProfileParams) WithProfileName(x string) *RemoveProfileParams

type RemoveProfileResponse

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

Represents the response body for the RemoveProfile request.

type SetCurrentProfileParams

type SetCurrentProfileParams struct {
	// Name of the profile to switch to
	ProfileName *string `json:"profileName,omitempty"`
}

Represents the request body for the SetCurrentProfile request.

func NewSetCurrentProfileParams added in v1.0.0

func NewSetCurrentProfileParams() *SetCurrentProfileParams

func (*SetCurrentProfileParams) GetRequestName

func (o *SetCurrentProfileParams) GetRequestName() string

Returns the associated request.

func (*SetCurrentProfileParams) WithProfileName added in v1.0.0

type SetCurrentProfileResponse

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

Represents the response body for the SetCurrentProfile request.

type SetCurrentSceneCollectionParams

type SetCurrentSceneCollectionParams struct {
	// Name of the scene collection to switch to
	SceneCollectionName *string `json:"sceneCollectionName,omitempty"`
}

Represents the request body for the SetCurrentSceneCollection request.

func NewSetCurrentSceneCollectionParams added in v1.0.0

func NewSetCurrentSceneCollectionParams() *SetCurrentSceneCollectionParams

func (*SetCurrentSceneCollectionParams) GetRequestName

func (o *SetCurrentSceneCollectionParams) GetRequestName() string

Returns the associated request.

func (*SetCurrentSceneCollectionParams) WithSceneCollectionName added in v1.0.0

type SetCurrentSceneCollectionResponse

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

Represents the response body for the SetCurrentSceneCollection request.

type SetPersistentDataParams

type SetPersistentDataParams struct {
	// The data realm to select. `OBS_WEBSOCKET_DATA_REALM_GLOBAL` or `OBS_WEBSOCKET_DATA_REALM_PROFILE`
	Realm *string `json:"realm,omitempty"`

	// The name of the slot to retrieve data from
	SlotName *string `json:"slotName,omitempty"`

	// The value to apply to the slot
	SlotValue any `json:"slotValue,omitempty"`
}

Represents the request body for the SetPersistentData request.

func NewSetPersistentDataParams added in v1.0.0

func NewSetPersistentDataParams() *SetPersistentDataParams

func (*SetPersistentDataParams) GetRequestName

func (o *SetPersistentDataParams) GetRequestName() string

Returns the associated request.

func (*SetPersistentDataParams) WithRealm added in v1.0.0

func (*SetPersistentDataParams) WithSlotName added in v1.0.0

func (*SetPersistentDataParams) WithSlotValue added in v1.0.0

type SetPersistentDataResponse

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

Represents the response body for the SetPersistentData request.

type SetProfileParameterParams

type SetProfileParameterParams struct {
	// Category of the parameter to set
	ParameterCategory *string `json:"parameterCategory,omitempty"`

	// Name of the parameter to set
	ParameterName *string `json:"parameterName,omitempty"`

	// Value of the parameter to set. Use `null` to delete
	ParameterValue *string `json:"parameterValue,omitempty"`
}

Represents the request body for the SetProfileParameter request.

func NewSetProfileParameterParams added in v1.0.0

func NewSetProfileParameterParams() *SetProfileParameterParams

func (*SetProfileParameterParams) GetRequestName

func (o *SetProfileParameterParams) GetRequestName() string

Returns the associated request.

func (*SetProfileParameterParams) WithParameterCategory added in v1.0.0

func (o *SetProfileParameterParams) WithParameterCategory(x string) *SetProfileParameterParams

func (*SetProfileParameterParams) WithParameterName added in v1.0.0

func (*SetProfileParameterParams) WithParameterValue added in v1.0.0

type SetProfileParameterResponse

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

Represents the response body for the SetProfileParameter request.

type SetRecordDirectoryParams added in v1.1.0

type SetRecordDirectoryParams struct {
	// Output directory
	RecordDirectory *string `json:"recordDirectory,omitempty"`
}

Represents the request body for the SetRecordDirectory request.

func NewSetRecordDirectoryParams added in v1.1.0

func NewSetRecordDirectoryParams() *SetRecordDirectoryParams

func (*SetRecordDirectoryParams) GetRequestName added in v1.1.0

func (o *SetRecordDirectoryParams) GetRequestName() string

Returns the associated request.

func (*SetRecordDirectoryParams) WithRecordDirectory added in v1.1.0

func (o *SetRecordDirectoryParams) WithRecordDirectory(x string) *SetRecordDirectoryParams

type SetRecordDirectoryResponse added in v1.1.0

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

Represents the response body for the SetRecordDirectory request.

type SetStreamServiceSettingsParams

type SetStreamServiceSettingsParams struct {
	// Settings to apply to the service
	StreamServiceSettings *typedefs.StreamServiceSettings `json:"streamServiceSettings,omitempty"`

	// Type of stream service to apply. Example: `rtmp_common` or `rtmp_custom`
	StreamServiceType *string `json:"streamServiceType,omitempty"`
}

Represents the request body for the SetStreamServiceSettings request.

func NewSetStreamServiceSettingsParams added in v1.0.0

func NewSetStreamServiceSettingsParams() *SetStreamServiceSettingsParams

func (*SetStreamServiceSettingsParams) GetRequestName

func (o *SetStreamServiceSettingsParams) GetRequestName() string

Returns the associated request.

func (*SetStreamServiceSettingsParams) WithStreamServiceSettings added in v1.0.0

func (*SetStreamServiceSettingsParams) WithStreamServiceType added in v1.0.0

type SetStreamServiceSettingsResponse

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

Represents the response body for the SetStreamServiceSettings request.

type SetVideoSettingsParams

type SetVideoSettingsParams struct {
	// Height of the base (canvas) resolution in pixels
	BaseHeight *float64 `json:"baseHeight,omitempty"`

	// Width of the base (canvas) resolution in pixels
	BaseWidth *float64 `json:"baseWidth,omitempty"`

	// Denominator of the fractional FPS value
	FpsDenominator *float64 `json:"fpsDenominator,omitempty"`

	// Numerator of the fractional FPS value
	FpsNumerator *float64 `json:"fpsNumerator,omitempty"`

	// Height of the output resolution in pixels
	OutputHeight *float64 `json:"outputHeight,omitempty"`

	// Width of the output resolution in pixels
	OutputWidth *float64 `json:"outputWidth,omitempty"`
}

Represents the request body for the SetVideoSettings request.

func NewSetVideoSettingsParams added in v1.0.0

func NewSetVideoSettingsParams() *SetVideoSettingsParams

func (*SetVideoSettingsParams) GetRequestName

func (o *SetVideoSettingsParams) GetRequestName() string

Returns the associated request.

func (*SetVideoSettingsParams) WithBaseHeight added in v1.0.0

func (*SetVideoSettingsParams) WithBaseWidth added in v1.0.0

func (*SetVideoSettingsParams) WithFpsDenominator added in v1.0.0

func (o *SetVideoSettingsParams) WithFpsDenominator(x float64) *SetVideoSettingsParams

func (*SetVideoSettingsParams) WithFpsNumerator added in v1.0.0

func (o *SetVideoSettingsParams) WithFpsNumerator(x float64) *SetVideoSettingsParams

func (*SetVideoSettingsParams) WithOutputHeight added in v1.0.0

func (o *SetVideoSettingsParams) WithOutputHeight(x float64) *SetVideoSettingsParams

func (*SetVideoSettingsParams) WithOutputWidth added in v1.0.0

func (o *SetVideoSettingsParams) WithOutputWidth(x float64) *SetVideoSettingsParams

type SetVideoSettingsResponse

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

Represents the response body for the SetVideoSettings request.

Jump to

Keyboard shortcuts

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