Documentation
¶
Overview ¶
Code generated by cmd/main. DO NOT EDIT.
Index ¶
- type AdminStreamsListQuery
- type AgentsListQuery
- type BaseClientFactory
- type Client
- func (c *Client) AdminStreamsList(ctx context.Context, query *AdminStreamsListQuery) (model.StreamsList, error)
- func (c *Client) AdminStreamsListIterator(ctx context.Context, query *AdminStreamsListQuery) iter.Seq2[model.StreamConfig, error]
- func (c *Client) AgentGet(ctx context.Context, id string) (model.WatcherAgentConfig, error)
- func (c *Client) AgentsList(ctx context.Context, query *AgentsListQuery) (model.AgentsList, error)
- func (c *Client) AgentsListIterator(ctx context.Context, query *AgentsListQuery) iter.Seq2[model.Agent, error]
- func (c *Client) CameraAuthGet(ctx context.Context, name string) (model.Auth, error)
- func (c *Client) CameraAuthSave(ctx context.Context, name string) (model.Auth, error)
- func (c *Client) CameraConfigGet(ctx context.Context, name string) (model.CameraConfig, error)
- func (c *Client) CameraConfigSave(ctx context.Context, name string, body model.CameraConfig) (model.CameraConfig, error)
- func (c *Client) CameraReboot(ctx context.Context, name string) error
- func (c *Client) ClusterStatsGet(ctx context.Context, query *ClusterStatsGetQuery) (model.ClusterHealthStats, error)
- func (c *Client) DeleteOrganizationPreset(ctx context.Context, organization_id string, preset_id string) error
- func (c *Client) DomainConfigGet(ctx context.Context) (model.DomainConfig, error)
- func (c *Client) DomainConfigSave(ctx context.Context, body model.DomainConfig) error
- func (c *Client) EventsList(ctx context.Context, query *EventsListQuery) (model.EventsList, error)
- func (c *Client) EventsListIterator(ctx context.Context, query *EventsListQuery) iter.Seq2[model.Event, error]
- func (c *Client) LetsencryptIssue(ctx context.Context, body model.LetsencryptRequest) (model.TlsCertificate, error)
- func (c *Client) LivenessProbe(ctx context.Context) (model.ServerStatsWhoami, error)
- func (c *Client) LoginCreate(ctx context.Context) (model.LoginInfoAdditional, error)
- func (c *Client) OrganizationPresetSave(ctx context.Context, organization_id string, body model.OrganizationPreset) (model.Preset, error)
- func (c *Client) PresetGet(ctx context.Context, id string) (model.Preset, error)
- func (c *Client) PresetSave(ctx context.Context, id string, body model.Preset) (model.Preset, error)
- func (c *Client) PresetsCreate(ctx context.Context, body model.Preset) (model.Preset, error)
- func (c *Client) PresetsList(ctx context.Context, query *PresetsListQuery) (model.PresetsList, error)
- func (c *Client) PresetsListIterator(ctx context.Context, query *PresetsListQuery) iter.Seq2[model.Preset, error]
- func (c *Client) PreviewLayoutChangeForStreamConfig(ctx context.Context, name string, ...) (model.CentralStreamLayoutPrediction, error)
- func (c *Client) PreviewLayoutChangeForStreamConfigIterator(ctx context.Context, name string, ...) iter.Seq2[model.CentralStreamLayoutListItem, error]
- func (c *Client) PreviewLayoutChangeForStreamerConfig(ctx context.Context, hostname string, ...) (model.CentralStreamerLayoutPrediction, error)
- func (c *Client) PreviewLayoutChangeForStreamerConfigIterator(ctx context.Context, hostname string, ...) iter.Seq2[model.CentralStreamerLayoutPredictionItem, error]
- func (c *Client) ReadinessProbe(ctx context.Context) (model.ServerStatsWhoami, error)
- func (c *Client) SharedTokenCreate(ctx context.Context, body model.SharedToken) (model.SharedToken, error)
- func (c *Client) SharedTokenDelete(ctx context.Context, key string) error
- func (c *Client) SharedTokensList(ctx context.Context, query *SharedTokensListQuery) (model.SharedTokensList, error)
- func (c *Client) SharedTokensListIterator(ctx context.Context, query *SharedTokensListQuery) iter.Seq2[model.SharedToken, error]
- func (c *Client) StreamDelete(ctx context.Context, name string, query *StreamDeleteQuery) error
- func (c *Client) StreamFirmwareUpdate(ctx context.Context, name string, body model.FirmwareUpdate) error
- func (c *Client) StreamGet(ctx context.Context, name string) (model.StreamConfig, error)
- func (c *Client) StreamLayoutsGet(ctx context.Context, name string, query *StreamLayoutsGetQuery) (model.CentralStreamLayouts, error)
- func (c *Client) StreamLayoutsGetIterator(ctx context.Context, name string, query *StreamLayoutsGetQuery) iter.Seq2[model.CentralStreamLayout, error]
- func (c *Client) StreamSave(ctx context.Context, name string, query *StreamSaveQuery, ...) (model.StreamConfig, error)
- func (c *Client) StreamerDelete(ctx context.Context, hostname string) error
- func (c *Client) StreamerGet(ctx context.Context, hostname string) (model.Streamer, error)
- func (c *Client) StreamerSave(ctx context.Context, hostname string, query *StreamerSaveQuery, ...) (model.Streamer, error)
- func (c *Client) StreamersList(ctx context.Context, query *StreamersListQuery) (model.StreamersList, error)
- func (c *Client) StreamersListIterator(ctx context.Context, query *StreamersListQuery) iter.Seq2[model.Streamer, error]
- func (c *Client) StreamsMultiedit(ctx context.Context, body model.StreamsMultieditConfig) error
- func (c *Client) StreamsZonesSettings(ctx context.Context, body model.StreamsZoneSettings) error
- func (c *Client) SystemConfigGet(ctx context.Context) (model.SystemConfig, error)
- func (c *Client) TlsCertificateGet(ctx context.Context) (model.TlsCertificate, error)
- func (c *Client) UserCreate(ctx context.Context, body any) (model.User, error)
- func (c *Client) UserDelete(ctx context.Context, user_id string) error
- func (c *Client) UserGet(ctx context.Context, user_id string) (model.User, error)
- func (c *Client) UserSave(ctx context.Context, user_id string, body model.User) (model.User, error)
- func (c *Client) UsersApikeyCreate(ctx context.Context, user_id string) (model.Apikey, error)
- func (c *Client) UsersApikeyGet(ctx context.Context, user_id string) (model.Apikey, error)
- func (c *Client) UsersList(ctx context.Context, query *UsersListQuery) (model.Users, error)
- func (c *Client) UsersListIterator(ctx context.Context, query *UsersListQuery) iter.Seq2[model.User, error]
- func (c *Client) WatcherProvision(ctx context.Context) (model.WatcherStatus, error)
- func (c *Client) WatcherStatusGet(ctx context.Context) (model.WatcherStatus, error)
- func (c *Client) ZoneDelete(ctx context.Context, name string) error
- func (c *Client) ZoneGet(ctx context.Context, name string) (model.Zone, error)
- func (c *Client) ZoneSave(ctx context.Context, name string, body model.Zone) (model.Zone, error)
- func (c *Client) ZonesList(ctx context.Context, query *ZonesListQuery) (model.ZonesList, error)
- func (c *Client) ZonesListIterator(ctx context.Context, query *ZonesListQuery) iter.Seq2[model.Zone, error]
- type ClusterStatsGetQuery
- type EventsListQuery
- type PresetsListQuery
- type PreviewLayoutChangeForStreamConfigQuery
- type PreviewLayoutChangeForStreamerConfigQuery
- type SharedTokensListQuery
- type StreamDeleteQuery
- type StreamLayoutsGetQuery
- type StreamSaveQuery
- type StreamerSaveQuery
- type StreamersListQuery
- type UsersListQuery
- type WatcherAdmin
- type ZonesListQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminStreamsListQuery ¶
type AdminStreamsListQuery struct {
Cursor string
Limit int
// Comma-separated list of preferred zones. Returns streams, belonging to at least one preferred zone from the list.
PreferredZones string
// Comma-separated list of required zones. Returns streams, belonging to at least one required zone from the list.
RequiredZones string
Select []string
Sort []string
Extra map[string]string
}
AdminStreamsListQuery represents query parameters for AdminStreamsList method
func (*AdminStreamsListQuery) SetCursor ¶
func (q *AdminStreamsListQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*AdminStreamsListQuery) ToQueryString ¶
func (q *AdminStreamsListQuery) ToQueryString() (string, error)
ToQueryString converts AdminStreamsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type AgentsListQuery ¶
type AgentsListQuery struct {
Cursor string
Limit int
// Organization identifier to select agents only available for this organization. If the `organization_id` is not transferred, all available agents will be returned.
OrganizationId int
Select []string
Sort []string
// Filter agents by stream presence. If any stream has the agent in its inputs, the agent will not be returned with filter `stream_is=null`.
Stream string
// Filter agents by stream title using partial match. The search is case-insensitive and matches any part of the stream title.
TitleLike string
Extra map[string]string
}
AgentsListQuery represents query parameters for AgentsList method
func (*AgentsListQuery) SetCursor ¶
func (q *AgentsListQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*AgentsListQuery) ToQueryString ¶
func (q *AgentsListQuery) ToQueryString() (string, error)
ToQueryString converts AgentsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type BaseClientFactory ¶
type BaseClientFactory func(cfg *config.Config, apiURL string, authKey authorization.AuthKey) baseclient.BaseClient
BaseClientFactory is a factory function type for creating base HTTP clients.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the concrete implementation of the WatcherAdmin interface.
func (*Client) AdminStreamsList ¶
func (c *Client) AdminStreamsList(ctx context.Context, query *AdminStreamsListQuery) (model.StreamsList, error)
AdminStreamsList List streams for admin The key difference between this method and streams_list is the additional parameters. These additional parameters are available only for admin (e.g. 'required_zones' and 'preferred_zones'). This API method is one of the most important in whole API, because it gives the list of all streams. `streams_list` in Watcher Admin API: * can list all streams within the Watcher. * admin is not allowed to watch content from any cameras for security reasons. `streams_list` in Watcher Client API: * return streams from organizations where you're member * provives a playback token that allows play video from the camera.
func (*Client) AdminStreamsListIterator ¶
func (c *Client) AdminStreamsListIterator(ctx context.Context, query *AdminStreamsListQuery) iter.Seq2[model.StreamConfig, error]
AdminStreamsListIterator iterates through all StreamConfig items using cursor pagination.
func (*Client) AgentGet ¶
AgentGet Get one Agent The method allows you to fetch a single Agent. The returned data are the same as for `agents_list` operation.
func (*Client) AgentsList ¶
func (c *Client) AgentsList(ctx context.Context, query *AgentsListQuery) (model.AgentsList, error)
AgentsList List Agents The list of configured and provisioned Agents, i.e. Agents that connected to your server at least once.
func (*Client) AgentsListIterator ¶
func (c *Client) AgentsListIterator(ctx context.Context, query *AgentsListQuery) iter.Seq2[model.Agent, error]
AgentsListIterator iterates through all Agent items using cursor pagination.
func (*Client) CameraAuthGet ¶
CameraAuthGet Get auth for camera Create or update a auth for camera by its name.
func (*Client) CameraAuthSave ¶
CameraAuthSave Save auth for camera Create or update a auth for camera by its name.
func (*Client) CameraConfigGet ¶
CameraConfigGet Get one stream camera config This method allows to fetch a single stream camera config info.
func (*Client) CameraConfigSave ¶
func (c *Client) CameraConfigSave(ctx context.Context, name string, body model.CameraConfig) (model.CameraConfig, error)
CameraConfigSave Save stream camera config Create or update a stream config by its name.
func (*Client) CameraReboot ¶
CameraReboot Reboot camera Reboot camera
func (*Client) ClusterStatsGet ¶
func (c *Client) ClusterStatsGet(ctx context.Context, query *ClusterStatsGetQuery) (model.ClusterHealthStats, error)
ClusterStatsGet Get current health of cluster This method allows you to fetch cluster's health
func (*Client) DeleteOrganizationPreset ¶
func (c *Client) DeleteOrganizationPreset(ctx context.Context, organization_id string, preset_id string) error
DeleteOrganizationPreset Delete preset from organization This method allows to remove a specific preset from organization.
func (*Client) DomainConfigGet ¶
DomainConfigGet Get domain settings The method allows you to get the domain settings
func (*Client) DomainConfigSave ¶
DomainConfigSave Save domain settings The method allows you to save the domain settings
func (*Client) EventsList ¶
func (c *Client) EventsList(ctx context.Context, query *EventsListQuery) (model.EventsList, error)
EventsList Get events of Watcher This method allows to get the batch of events. Currently this method is not implemented yet. However, its schema can be used for understanding Watcher logging.
func (*Client) EventsListIterator ¶
func (c *Client) EventsListIterator(ctx context.Context, query *EventsListQuery) iter.Seq2[model.Event, error]
EventsListIterator iterates through all Event items using cursor pagination.
func (*Client) LetsencryptIssue ¶
func (c *Client) LetsencryptIssue(ctx context.Context, body model.LetsencryptRequest) (model.TlsCertificate, error)
LetsencryptIssue Issue letsencrypt certificate Issue letsencrypt certificate
func (*Client) LivenessProbe ¶
LivenessProbe Liveness probe K8s liveness probe.
func (*Client) LoginCreate ¶
LoginCreate Get an auth token The method creates a new temporary auth-token (JWT). The JTW token used as Bearer token in requests other than `/login`.
func (*Client) OrganizationPresetSave ¶
func (c *Client) OrganizationPresetSave(ctx context.Context, organization_id string, body model.OrganizationPreset) (model.Preset, error)
OrganizationPresetSave Update organizations preset Save organization preset by its id or adds new preset to organization.
func (*Client) PresetGet ¶
PresetGet Get one preset This method is used to get info about preset by its id.
func (*Client) PresetSave ¶
func (c *Client) PresetSave(ctx context.Context, id string, body model.Preset) (model.Preset, error)
PresetSave Update preset This method will update the existing preset with the specified id.
func (*Client) PresetsCreate ¶
PresetsCreate Create preset This method will create a new preset.
func (*Client) PresetsList ¶
func (c *Client) PresetsList(ctx context.Context, query *PresetsListQuery) (model.PresetsList, error)
PresetsList List presets The presets in Watcher is a set of DVR and analytics parameters that you can use as a template when creating and configuring cameras. When you select a preset in the camera settings, the parameters from the preset are populated to the camera settings. A set of presets on the camera is defined by the set of presets selected for the camera's Organization. https://flussonic.com/doc/manage-presets-in-watcher-ui/ This method is used to get info about presets. If the `organization_id` is transferred this method will return presets only allowed in organization with that Id.
func (*Client) PresetsListIterator ¶
func (c *Client) PresetsListIterator(ctx context.Context, query *PresetsListQuery) iter.Seq2[model.Preset, error]
PresetsListIterator iterates through all Preset items using cursor pagination.
func (*Client) PreviewLayoutChangeForStreamConfig ¶
func (c *Client) PreviewLayoutChangeForStreamConfig(ctx context.Context, name string, query *PreviewLayoutChangeForStreamConfigQuery, body model.StreamConfig) (model.CentralStreamLayoutPrediction, error)
PreviewLayoutChangeForStreamConfig Dry run layouter for changed stream configuration This method allows you to see how the overall layout will be changed due to changes into stream configuration. Note that if [Layouter](https://flussonic.com/doc/api/layouter/) is [disabled](https://flussonic.com/doc/api/central/#tag/config/operation/config_save%7Cbody%7Clayouter_enabled), this method will return an error.
func (*Client) PreviewLayoutChangeForStreamConfigIterator ¶
func (c *Client) PreviewLayoutChangeForStreamConfigIterator(ctx context.Context, name string, query *PreviewLayoutChangeForStreamConfigQuery, body model.StreamConfig) iter.Seq2[model.CentralStreamLayoutListItem, error]
PreviewLayoutChangeForStreamConfigIterator iterates through all CentralStreamLayoutListItem items using cursor pagination.
func (*Client) PreviewLayoutChangeForStreamerConfig ¶
func (c *Client) PreviewLayoutChangeForStreamerConfig(ctx context.Context, hostname string, query *PreviewLayoutChangeForStreamerConfigQuery, body model.StreamerLayoutPrediction) (model.CentralStreamerLayoutPrediction, error)
PreviewLayoutChangeForStreamerConfig Dry run layouter for changed streamer configuration This method allows you to see how the overall layout will be changed due to changes into streamer configuration. Note that if [Layouter](https://flussonic.com/doc/api/layouter/) is [disabled](https://flussonic.com/doc/api/central/#tag/config/operation/config_save%7Cbody%7Clayouter_enabled), this method will return an error.
func (*Client) PreviewLayoutChangeForStreamerConfigIterator ¶
func (c *Client) PreviewLayoutChangeForStreamerConfigIterator(ctx context.Context, hostname string, query *PreviewLayoutChangeForStreamerConfigQuery, body model.StreamerLayoutPrediction) iter.Seq2[model.CentralStreamerLayoutPredictionItem, error]
PreviewLayoutChangeForStreamerConfigIterator iterates through all CentralStreamerLayoutPredictionItem items using cursor pagination.
func (*Client) ReadinessProbe ¶
ReadinessProbe Readiness probe K8s readiness probe.
func (*Client) SharedTokenCreate ¶
func (c *Client) SharedTokenCreate(ctx context.Context, body model.SharedToken) (model.SharedToken, error)
SharedTokenCreate Create Shared token Method to create shared token
func (*Client) SharedTokenDelete ¶
SharedTokenDelete Delete Shared token This method allows to delete a single shared token.
func (*Client) SharedTokensList ¶
func (c *Client) SharedTokensList(ctx context.Context, query *SharedTokensListQuery) (model.SharedTokensList, error)
SharedTokensList List Shared tokens Method allows to fetch configured Shared tokens
func (*Client) SharedTokensListIterator ¶
func (c *Client) SharedTokensListIterator(ctx context.Context, query *SharedTokensListQuery) iter.Seq2[model.SharedToken, error]
SharedTokensListIterator iterates through all SharedToken items using cursor pagination.
func (*Client) StreamDelete ¶
StreamDelete Delete the stream This method allows to delete a single stream. You can delete `config_override` by this API call if you want to remove all runtime overrides. If you do not specify any `part` parameter, this stream will be deleted from `config_on_disk` and if it was `named_by: config`, then it will immediately stop.
func (*Client) StreamFirmwareUpdate ¶
func (c *Client) StreamFirmwareUpdate(ctx context.Context, name string, body model.FirmwareUpdate) error
StreamFirmwareUpdate Update camera firmware This method allows you to update camera firmware
func (*Client) StreamGet ¶
StreamGet Get one stream This method allows to fetch a single stream. Refer to the `streams_list` operation to find out what data will be returned in this method.
func (*Client) StreamLayoutsGet ¶
func (c *Client) StreamLayoutsGet(ctx context.Context, name string, query *StreamLayoutsGetQuery) (model.CentralStreamLayouts, error)
StreamLayoutsGet Get layouts of stream This method allows you to fetch stream layouts list
func (*Client) StreamLayoutsGetIterator ¶
func (c *Client) StreamLayoutsGetIterator(ctx context.Context, name string, query *StreamLayoutsGetQuery) iter.Seq2[model.CentralStreamLayout, error]
StreamLayoutsGetIterator iterates through all CentralStreamLayout items using cursor pagination.
func (*Client) StreamSave ¶
func (c *Client) StreamSave(ctx context.Context, name string, query *StreamSaveQuery, body model.StreamConfig) (model.StreamConfig, error)
StreamSave Save stream Create or update a stream by its name. If the stream doesn't exists in the disk config, it will be created. If you try to update a stream that is started from a template by a user request having `named_by=user`, a new stream will be created in the disk config. If you pass only a partial stream configuration, this field will be updated, not the whole stream. To create a new stream the property `name` is required. Pass the `"$reset": true` option to replace the stream configuration with the provided one.
func (*Client) StreamerDelete ¶
StreamerDelete Delete the streamer Delete the streamer by its hostname.
func (*Client) StreamerGet ¶
StreamerGet Get the streamer This method allows you to fetch the main parameters and current metrics of a single streamer
func (*Client) StreamerSave ¶
func (c *Client) StreamerSave(ctx context.Context, hostname string, query *StreamerSaveQuery, body model.Streamer) (model.Streamer, error)
StreamerSave Save the streamer This method will either create a new streamer (if there is no streamer with the hostname specified in the request), or update the existing streamer having the specified hostname.
func (*Client) StreamersList ¶
func (c *Client) StreamersList(ctx context.Context, query *StreamersListQuery) (model.StreamersList, error)
StreamersList List streamers Returns the list of all streamers with main parameters and current metric values.
func (*Client) StreamersListIterator ¶
func (c *Client) StreamersListIterator(ctx context.Context, query *StreamersListQuery) iter.Seq2[model.Streamer, error]
StreamersListIterator iterates through all Streamer items using cursor pagination.
func (*Client) StreamsMultiedit ¶
StreamsMultiedit Save streams settings Create or update settings for each stream. This operation does everything or nothing. If at least one stream has an invalid configuration or can't be processed, the request will fail.
func (*Client) StreamsZonesSettings ¶
StreamsZonesSettings Save streams with zone settings Create or update zone settings for each stream. This operation does everything or nothing. If at least one stream has an invalid configuration or can't be processed, the request will fail.
func (*Client) SystemConfigGet ¶
SystemConfigGet Get system settings The method allows you to get the system settings
func (*Client) TlsCertificateGet ¶
TlsCertificateGet Get tls certificate Get current tls certificate
func (*Client) UserCreate ¶
UserCreate Create user This method allows you to create a user
func (*Client) UserDelete ¶
UserDelete Delete a user This method allows you to delete a user
func (*Client) UserGet ¶
UserGet Get a user This method allows you to fetch the user by its identifier
func (*Client) UsersApikeyCreate ¶
UsersApikeyCreate Create new API key for user The API key is used for authentication in API requests, allowing access to protected resources without using a password.
func (*Client) UsersApikeyGet ¶
UsersApikeyGet Get user's API key The API key is used for authentication in API requests, allowing access to protected resources without using a password.
func (*Client) UsersListIterator ¶
func (c *Client) UsersListIterator(ctx context.Context, query *UsersListQuery) iter.Seq2[model.User, error]
UsersListIterator iterates through all User items using cursor pagination.
func (*Client) WatcherProvision ¶
WatcherProvision The operator identifier creation This method allows you to create the operator identifier
func (*Client) WatcherStatusGet ¶
WatcherStatusGet Get the Watcher status Get the Watcher status on the agent server.
func (*Client) ZoneDelete ¶
ZoneDelete Delete the zone Delete the zone by its name.
func (*Client) ZoneGet ¶
ZoneGet Get the zone This method allows you to fetch the main parameters and current metrics of a single zone
func (*Client) ZoneSave ¶
ZoneSave Save the zone This method will either create a new zone (if there is no zone with the name specified in the request), or update the existing zone having the specified name.
type ClusterStatsGetQuery ¶
type ClusterStatsGetQuery struct {
// This parameter is used instead of the Accept header to select of non-JSON response content format.
Format string
Extra map[string]string
}
ClusterStatsGetQuery represents query parameters for ClusterStatsGet method
func (*ClusterStatsGetQuery) ToQueryString ¶
func (q *ClusterStatsGetQuery) ToQueryString() (string, error)
ToQueryString converts ClusterStatsGetQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type EventsListQuery ¶
type EventsListQuery struct {
Cursor string
Limit int
Select []string
Sort []string
Extra map[string]string
}
EventsListQuery represents query parameters for EventsList method
func (*EventsListQuery) SetCursor ¶
func (q *EventsListQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*EventsListQuery) ToQueryString ¶
func (q *EventsListQuery) ToQueryString() (string, error)
ToQueryString converts EventsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type PresetsListQuery ¶
type PresetsListQuery struct {
Cursor string
Limit int
// Organization identifier to select presets only available for this organization. If the `organization_id` is not transferred, all available presets will be returned.
OrganizationId int
Select []string
Sort []string
Extra map[string]string
}
PresetsListQuery represents query parameters for PresetsList method
func (*PresetsListQuery) SetCursor ¶
func (q *PresetsListQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*PresetsListQuery) ToQueryString ¶
func (q *PresetsListQuery) ToQueryString() (string, error)
ToQueryString converts PresetsListQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type PreviewLayoutChangeForStreamConfigQuery ¶
type PreviewLayoutChangeForStreamConfigQuery struct {
Cursor string
Limit int
Select []string
Sort []string
Extra map[string]string
}
PreviewLayoutChangeForStreamConfigQuery represents query parameters for PreviewLayoutChangeForStreamConfig method
func (*PreviewLayoutChangeForStreamConfigQuery) SetCursor ¶
func (q *PreviewLayoutChangeForStreamConfigQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*PreviewLayoutChangeForStreamConfigQuery) ToQueryString ¶
func (q *PreviewLayoutChangeForStreamConfigQuery) ToQueryString() (string, error)
ToQueryString converts PreviewLayoutChangeForStreamConfigQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type PreviewLayoutChangeForStreamerConfigQuery ¶
type PreviewLayoutChangeForStreamerConfigQuery struct {
Cursor string
Limit int
Select []string
Sort []string
Extra map[string]string
}
PreviewLayoutChangeForStreamerConfigQuery represents query parameters for PreviewLayoutChangeForStreamerConfig method
func (*PreviewLayoutChangeForStreamerConfigQuery) SetCursor ¶
func (q *PreviewLayoutChangeForStreamerConfigQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*PreviewLayoutChangeForStreamerConfigQuery) ToQueryString ¶
func (q *PreviewLayoutChangeForStreamerConfigQuery) ToQueryString() (string, error)
ToQueryString converts PreviewLayoutChangeForStreamerConfigQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type SharedTokensListQuery ¶
type SharedTokensListQuery struct {
}
SharedTokensListQuery represents query parameters for SharedTokensList method
func (*SharedTokensListQuery) SetCursor ¶
func (q *SharedTokensListQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*SharedTokensListQuery) ToQueryString ¶
func (q *SharedTokensListQuery) ToQueryString() (string, error)
ToQueryString converts SharedTokensListQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type StreamDeleteQuery ¶
StreamDeleteQuery represents query parameters for StreamDelete method
func (*StreamDeleteQuery) ToQueryString ¶
func (q *StreamDeleteQuery) ToQueryString() (string, error)
ToQueryString converts StreamDeleteQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type StreamLayoutsGetQuery ¶
type StreamLayoutsGetQuery struct {
// Get layouts created after this timestamp
CreatedAtGt int
// Get layouts created before this timestamp
CreatedAtLt int
// A properly encoded equivalent of offset allowing you to read the next bunch of items. We do not offer common `offset` fields, so please use cursor for predictable fetching of quickly changing list of items.
Cursor string
// Limit the number of returned layouts
Limit int
Select []string
Sort []string
Extra map[string]string
}
StreamLayoutsGetQuery represents query parameters for StreamLayoutsGet method
func (*StreamLayoutsGetQuery) SetCursor ¶
func (q *StreamLayoutsGetQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*StreamLayoutsGetQuery) ToQueryString ¶
func (q *StreamLayoutsGetQuery) ToQueryString() (string, error)
ToQueryString converts StreamLayoutsGetQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type StreamSaveQuery ¶
type StreamSaveQuery struct {
// The stream is configured by several origins of configuration. It may be `config_on_disk` or temporary runtime `config_override` that can be provided via `on_play` or `on_publish` backend, or edited via this API call if you pass `config_override` to this parameter.
Part string
Extra map[string]string
}
StreamSaveQuery represents query parameters for StreamSave method
func (*StreamSaveQuery) ToQueryString ¶
func (q *StreamSaveQuery) ToQueryString() (string, error)
ToQueryString converts StreamSaveQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type StreamerSaveQuery ¶
type StreamerSaveQuery struct {
// This flag enables some checks before saving streamer. List of checks: - Watcher can reach the streamer (get its config); If a request with `checks_enable=true` is sent, then if at least one of the checks fails, the streamer will not be saved.
ChecksEnable bool
Extra map[string]string
}
StreamerSaveQuery represents query parameters for StreamerSave method
func (*StreamerSaveQuery) ToQueryString ¶
func (q *StreamerSaveQuery) ToQueryString() (string, error)
ToQueryString converts StreamerSaveQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type StreamersListQuery ¶
type StreamersListQuery struct {
Cursor string
Limit int
Select []string
Sort []string
Extra map[string]string
}
StreamersListQuery represents query parameters for StreamersList method
func (*StreamersListQuery) SetCursor ¶
func (q *StreamersListQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*StreamersListQuery) ToQueryString ¶
func (q *StreamersListQuery) ToQueryString() (string, error)
ToQueryString converts StreamersListQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type UsersListQuery ¶
type UsersListQuery struct {
Cursor string
Limit int
// Organization identifier to select users only available for this organization. If the `organization_id` is not transferred, all available users will be returned.
OrganizationId int
Select []string
Sort []string
Extra map[string]string
}
UsersListQuery represents query parameters for UsersList method
func (*UsersListQuery) SetCursor ¶
func (q *UsersListQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*UsersListQuery) ToQueryString ¶
func (q *UsersListQuery) ToQueryString() (string, error)
ToQueryString converts UsersListQuery to a valid query string. It validates required parameters and returns an error if any are missing.
type WatcherAdmin ¶
type WatcherAdmin interface {
// AdminStreamsList List streams for admin
// The key difference between this method and streams_list is the additional parameters. These additional parameters are available only for admin (e.g. 'required_zones' and 'preferred_zones'). This API method is one of the most important in whole API, because it gives the list of all streams. `streams_list` in Watcher Admin API: * can list all streams within the Watcher. * admin is not allowed to watch content from any cameras for security reasons. `streams_list` in Watcher Client API: * return streams from organizations where you're member * provives a playback token that allows play video from the camera.
AdminStreamsList(ctx context.Context, query *AdminStreamsListQuery) (model.StreamsList, error)
// AdminStreamsListIterator iterates through all items using cursor pagination
AdminStreamsListIterator(ctx context.Context, query *AdminStreamsListQuery) iter.Seq2[model.StreamConfig, error]
// AgentGet Get one Agent
// The method allows you to fetch a single Agent. The returned data are the same as for `agents_list` operation.
AgentGet(ctx context.Context, id string) (model.WatcherAgentConfig, error)
// AgentsList List Agents
// The list of configured and provisioned Agents, i.e. Agents that connected to your server at least once.
AgentsList(ctx context.Context, query *AgentsListQuery) (model.AgentsList, error)
// AgentsListIterator iterates through all items using cursor pagination
AgentsListIterator(ctx context.Context, query *AgentsListQuery) iter.Seq2[model.Agent, error]
// CameraAuthGet Get auth for camera
// Create or update a auth for camera by its name.
CameraAuthGet(ctx context.Context, name string) (model.Auth, error)
// CameraAuthSave Save auth for camera
// Create or update a auth for camera by its name.
CameraAuthSave(ctx context.Context, name string) (model.Auth, error)
// CameraConfigGet Get one stream camera config
// This method allows to fetch a single stream camera config info.
CameraConfigGet(ctx context.Context, name string) (model.CameraConfig, error)
// CameraConfigSave Save stream camera config
// Create or update a stream config by its name.
CameraConfigSave(ctx context.Context, name string, body model.CameraConfig) (model.CameraConfig, error)
// CameraReboot Reboot camera
// Reboot camera
CameraReboot(ctx context.Context, name string) error
// ClusterStatsGet Get current health of cluster
// This method allows you to fetch cluster's health
ClusterStatsGet(ctx context.Context, query *ClusterStatsGetQuery) (model.ClusterHealthStats, error)
// DeleteOrganizationPreset Delete preset from organization
// This method allows to remove a specific preset from organization.
DeleteOrganizationPreset(ctx context.Context, organization_id string, preset_id string) error
// DomainConfigGet Get domain settings
// The method allows you to get the domain settings
DomainConfigGet(ctx context.Context) (model.DomainConfig, error)
// DomainConfigSave Save domain settings
// The method allows you to save the domain settings
DomainConfigSave(ctx context.Context, body model.DomainConfig) error
// EventsList Get events of Watcher
// This method allows to get the batch of events. Currently this method is not implemented yet. However, its schema can be used for understanding Watcher logging.
EventsList(ctx context.Context, query *EventsListQuery) (model.EventsList, error)
// EventsListIterator iterates through all items using cursor pagination
EventsListIterator(ctx context.Context, query *EventsListQuery) iter.Seq2[model.Event, error]
// LetsencryptIssue Issue letsencrypt certificate
// Issue letsencrypt certificate
LetsencryptIssue(ctx context.Context, body model.LetsencryptRequest) (model.TlsCertificate, error)
// LivenessProbe Liveness probe
// K8s liveness probe.
LivenessProbe(ctx context.Context) (model.ServerStatsWhoami, error)
// LoginCreate Get an auth token
// The method creates a new temporary auth-token (JWT). The JTW token used as Bearer token in requests other than `/login`.
LoginCreate(ctx context.Context) (model.LoginInfoAdditional, error)
// OrganizationPresetSave Update organizations preset
// Save organization preset by its id or adds new preset to organization.
OrganizationPresetSave(ctx context.Context, organization_id string, body model.OrganizationPreset) (model.Preset, error)
// PresetGet Get one preset
// This method is used to get info about preset by its id.
PresetGet(ctx context.Context, id string) (model.Preset, error)
// PresetSave Update preset
// This method will update the existing preset with the specified id.
PresetSave(ctx context.Context, id string, body model.Preset) (model.Preset, error)
// PresetsCreate Create preset
// This method will create a new preset.
PresetsCreate(ctx context.Context, body model.Preset) (model.Preset, error)
// PresetsList List presets
// The presets in Watcher is a set of DVR and analytics parameters that you can use as a template when creating and configuring cameras. When you select a preset in the camera settings, the parameters from the preset are populated to the camera settings. A set of presets on the camera is defined by the set of presets selected for the camera's Organization. https://flussonic.com/doc/manage-presets-in-watcher-ui/ This method is used to get info about presets. If the `organization_id` is transferred this method will return presets only allowed in organization with that Id.
PresetsList(ctx context.Context, query *PresetsListQuery) (model.PresetsList, error)
// PresetsListIterator iterates through all items using cursor pagination
PresetsListIterator(ctx context.Context, query *PresetsListQuery) iter.Seq2[model.Preset, error]
// PreviewLayoutChangeForStreamConfig Dry run layouter for changed stream configuration
// This method allows you to see how the overall layout will be changed due to changes into stream configuration. Note that if [Layouter](https://flussonic.com/doc/api/layouter/) is [disabled](https://flussonic.com/doc/api/central/#tag/config/operation/config_save%7Cbody%7Clayouter_enabled), this method will return an error.
PreviewLayoutChangeForStreamConfig(ctx context.Context, name string, query *PreviewLayoutChangeForStreamConfigQuery, body model.StreamConfig) (model.CentralStreamLayoutPrediction, error)
// PreviewLayoutChangeForStreamConfigIterator iterates through all items using cursor pagination
PreviewLayoutChangeForStreamConfigIterator(ctx context.Context, name string, query *PreviewLayoutChangeForStreamConfigQuery, body model.StreamConfig) iter.Seq2[model.CentralStreamLayoutListItem, error]
// PreviewLayoutChangeForStreamerConfig Dry run layouter for changed streamer configuration
// This method allows you to see how the overall layout will be changed due to changes into streamer configuration. Note that if [Layouter](https://flussonic.com/doc/api/layouter/) is [disabled](https://flussonic.com/doc/api/central/#tag/config/operation/config_save%7Cbody%7Clayouter_enabled), this method will return an error.
PreviewLayoutChangeForStreamerConfig(ctx context.Context, hostname string, query *PreviewLayoutChangeForStreamerConfigQuery, body model.StreamerLayoutPrediction) (model.CentralStreamerLayoutPrediction, error)
// PreviewLayoutChangeForStreamerConfigIterator iterates through all items using cursor pagination
PreviewLayoutChangeForStreamerConfigIterator(ctx context.Context, hostname string, query *PreviewLayoutChangeForStreamerConfigQuery, body model.StreamerLayoutPrediction) iter.Seq2[model.CentralStreamerLayoutPredictionItem, error]
// ReadinessProbe Readiness probe
// K8s readiness probe.
ReadinessProbe(ctx context.Context) (model.ServerStatsWhoami, error)
// Method to create shared token
SharedTokenCreate(ctx context.Context, body model.SharedToken) (model.SharedToken, error)
// This method allows to delete a single shared token.
SharedTokenDelete(ctx context.Context, key string) error
// Method allows to fetch configured Shared tokens
SharedTokensList(ctx context.Context, query *SharedTokensListQuery) (model.SharedTokensList, error)
SharedTokensListIterator(ctx context.Context, query *SharedTokensListQuery) iter.Seq2[model.SharedToken, error]
// StreamDelete Delete the stream
// This method allows to delete a single stream. You can delete `config_override` by this API call if you want to remove all runtime overrides. If you do not specify any `part` parameter, this stream will be deleted from `config_on_disk` and if it was `named_by: config`, then it will immediately stop.
StreamDelete(ctx context.Context, name string, query *StreamDeleteQuery) error
// StreamFirmwareUpdate Update camera firmware
// This method allows you to update camera firmware
StreamFirmwareUpdate(ctx context.Context, name string, body model.FirmwareUpdate) error
// StreamGet Get one stream
// This method allows to fetch a single stream. Refer to the `streams_list` operation to find out what data will be returned in this method.
StreamGet(ctx context.Context, name string) (model.StreamConfig, error)
// StreamLayoutsGet Get layouts of stream
// This method allows you to fetch stream layouts list
StreamLayoutsGet(ctx context.Context, name string, query *StreamLayoutsGetQuery) (model.CentralStreamLayouts, error)
// StreamLayoutsGetIterator iterates through all items using cursor pagination
StreamLayoutsGetIterator(ctx context.Context, name string, query *StreamLayoutsGetQuery) iter.Seq2[model.CentralStreamLayout, error]
// StreamSave Save stream
// Create or update a stream by its name. If the stream doesn't exists in the disk config, it will be created. If you try to update a stream that is started from a template by a user request having `named_by=user`, a new stream will be created in the disk config. If you pass only a partial stream configuration, this field will be updated, not the whole stream. To create a new stream the property `name` is required. Pass the `"$reset": true` option to replace the stream configuration with the provided one.
StreamSave(ctx context.Context, name string, query *StreamSaveQuery, body model.StreamConfig) (model.StreamConfig, error)
// StreamerDelete Delete the streamer
// Delete the streamer by its hostname.
StreamerDelete(ctx context.Context, hostname string) error
// StreamerGet Get the streamer
// This method allows you to fetch the main parameters and current metrics of a single streamer
StreamerGet(ctx context.Context, hostname string) (model.Streamer, error)
// StreamerSave Save the streamer
// This method will either create a new streamer (if there is no streamer with the hostname specified in the request), or update the existing streamer having the specified hostname.
StreamerSave(ctx context.Context, hostname string, query *StreamerSaveQuery, body model.Streamer) (model.Streamer, error)
// StreamersList List streamers
// Returns the list of all streamers with main parameters and current metric values.
StreamersList(ctx context.Context, query *StreamersListQuery) (model.StreamersList, error)
// StreamersListIterator iterates through all items using cursor pagination
StreamersListIterator(ctx context.Context, query *StreamersListQuery) iter.Seq2[model.Streamer, error]
// StreamsMultiedit Save streams settings
// Create or update settings for each stream. This operation does everything or nothing. If at least one stream has an invalid configuration or can't be processed, the request will fail.
StreamsMultiedit(ctx context.Context, body model.StreamsMultieditConfig) error
// StreamsZonesSettings Save streams with zone settings
// Create or update zone settings for each stream. This operation does everything or nothing. If at least one stream has an invalid configuration or can't be processed, the request will fail.
StreamsZonesSettings(ctx context.Context, body model.StreamsZoneSettings) error
// SystemConfigGet Get system settings
// The method allows you to get the system settings
SystemConfigGet(ctx context.Context) (model.SystemConfig, error)
// TlsCertificateGet Get tls certificate
// Get current tls certificate
TlsCertificateGet(ctx context.Context) (model.TlsCertificate, error)
// UserCreate Create user
// This method allows you to create a user
UserCreate(ctx context.Context, body any) (model.User, error)
// UserDelete Delete a user
// This method allows you to delete a user
UserDelete(ctx context.Context, user_id string) error
// UserGet Get a user
// This method allows you to fetch the user by its identifier
UserGet(ctx context.Context, user_id string) (model.User, error)
// UserSave Save user
// This method allows you to update user data
UserSave(ctx context.Context, user_id string, body model.User) (model.User, error)
// UsersApikeyCreate Create new API key for user
// The API key is used for authentication in API requests, allowing access to protected resources without using a password.
UsersApikeyCreate(ctx context.Context, user_id string) (model.Apikey, error)
// UsersApikeyGet Get user's API key
// The API key is used for authentication in API requests, allowing access to protected resources without using a password.
UsersApikeyGet(ctx context.Context, user_id string) (model.Apikey, error)
// UsersList List of users
// List of available users
UsersList(ctx context.Context, query *UsersListQuery) (model.Users, error)
// UsersListIterator iterates through all items using cursor pagination
UsersListIterator(ctx context.Context, query *UsersListQuery) iter.Seq2[model.User, error]
// WatcherProvision The operator identifier creation
// This method allows you to create the operator identifier
WatcherProvision(ctx context.Context) (model.WatcherStatus, error)
// WatcherStatusGet Get the Watcher status
// Get the Watcher status on the agent server.
WatcherStatusGet(ctx context.Context) (model.WatcherStatus, error)
// ZoneDelete Delete the zone
// Delete the zone by its name.
ZoneDelete(ctx context.Context, name string) error
// ZoneGet Get the zone
// This method allows you to fetch the main parameters and current metrics of a single zone
ZoneGet(ctx context.Context, name string) (model.Zone, error)
// ZoneSave Save the zone
// This method will either create a new zone (if there is no zone with the name specified in the request), or update the existing zone having the specified name.
ZoneSave(ctx context.Context, name string, body model.Zone) (model.Zone, error)
// ZonesList List zones
// Returns the list of all zones with main parameters and current metric values.
ZonesList(ctx context.Context, query *ZonesListQuery) (model.ZonesList, error)
// ZonesListIterator iterates through all items using cursor pagination
ZonesListIterator(ctx context.Context, query *ZonesListQuery) iter.Seq2[model.Zone, error]
}
WatcherAdmin defines the interface for interacting with WatcherAdmin API.
func New ¶
func New(cfg *config.Config) (WatcherAdmin, error)
New creates a new WatcherAdmin client with default settings.
func NewWithBaseFactory ¶
func NewWithBaseFactory(cfg *config.Config, baseFactory BaseClientFactory) (WatcherAdmin, error)
NewWithBaseFactory creates a new WatcherAdmin client with a custom base client factory. This is primarily used for testing or when custom HTTP client behavior is needed.
type ZonesListQuery ¶
type ZonesListQuery struct {
Cursor string
Limit int
Select []string
Sort []string
Extra map[string]string
}
ZonesListQuery represents query parameters for ZonesList method
func (*ZonesListQuery) SetCursor ¶
func (q *ZonesListQuery) SetCursor(cursor *string)
SetCursor sets the cursor for pagination.
func (*ZonesListQuery) ToQueryString ¶
func (q *ZonesListQuery) ToQueryString() (string, error)
ToQueryString converts ZonesListQuery to a valid query string. It validates required parameters and returns an error if any are missing.