Documentation ¶
Index ¶
- Variables
- type ApplicationDeviceCounts
- type Applications
- type Connections
- type DeviceAccessKeys
- type DeviceApplicationStatuses
- type DeviceRegistrationTokens
- type DeviceServiceStates
- type DeviceServiceStatuses
- type Devices
- type DevicesRegisteredWithToken
- type ExternalUsers
- type InternalUsers
- type MembershipRoleBindings
- type Memberships
- type MetricConfigs
- type PasswordRecoveryTokens
- type ProjectApplicationCounts
- type ProjectDeviceCounts
- type Projects
- type RegistrationTokens
- type ReleaseDeviceCounts
- type Releases
- type Roles
- type ServiceAccountAccessKeys
- type ServiceAccountRoleBindings
- type ServiceAccounts
- type Sessions
- type UserAccessKeys
- type Users
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrApplicationNameAlreadyInUse = errors.New("application name already in use")
View Source
var ErrApplicationNotFound = errors.New("application not found")
View Source
var ErrConnectionNameAlreadyInUse = errors.New("connection name already in use")
View Source
var ErrConnectionNotFound = errors.New("connection not found")
View Source
var ErrDeviceAccessKeyNotFound = errors.New("device access key not found")
View Source
var ErrDeviceApplicationStatusNotFound = errors.New("device application status not found")
View Source
var ErrDeviceNameAlreadyInUse = errors.New("device name already in use")
View Source
var ErrDeviceNotFound = errors.New("device not found")
View Source
var ErrDeviceRegistrationTokenNameAlreadyInUse = errors.New("device registration token name already in use")
View Source
var ErrDeviceRegistrationTokenNotFound = errors.New("device registration token not found")
View Source
var ErrDeviceServiceStateNotFound = errors.New("device service state not found")
View Source
var ErrDeviceServiceStatusNotFound = errors.New("device service status not found")
View Source
var ErrMembershipNotFound = errors.New("membership not found")
View Source
var ErrMembershipRoleBindingNotFound = errors.New("membership role binding not found")
View Source
var ErrPasswordRecoveryTokenNotFound = errors.New("password recovery token not found")
View Source
var ErrProjectConfigNotFound = errors.New("project config not found")
View Source
var ErrProjectNameAlreadyInUse = errors.New("project name already in use")
View Source
var ErrProjectNotFound = errors.New("project not found")
View Source
var ErrRegistrationTokenNotFound = errors.New("registration token not found")
View Source
var ErrReleaseNotFound = errors.New("release not found")
View Source
var ErrRoleNameAlreadyInUse = errors.New("role name already in use")
View Source
var ErrRoleNotFound = errors.New("role not found")
View Source
var ErrServiceAccountAccessKeyNotFound = errors.New("service account access key not found")
View Source
var ErrServiceAccountNameAlreadyInUse = errors.New("service account name already in use")
View Source
var ErrServiceAccountNotFound = errors.New("service account not found")
View Source
var ErrServiceAccountRoleBindingNotFound = errors.New("service account role binding not found")
View Source
var ErrSessionNotFound = errors.New("session not found")
View Source
var ErrUserAccessKeyNotFound = errors.New("user access key not found")
View Source
var ErrUserNotFound = errors.New("user not found")
Functions ¶
This section is empty.
Types ¶
type ApplicationDeviceCounts ¶
type Applications ¶
type Applications interface { CreateApplication(ctx context.Context, projectID, name, description string) (*models.Application, error) GetApplication(ctx context.Context, id, projectID string) (*models.Application, error) LookupApplication(ctx context.Context, name, projectID string) (*models.Application, error) ListApplications(ctx context.Context, projectID string) ([]models.Application, error) UpdateApplicationName(ctx context.Context, id, projectID, name string) (*models.Application, error) UpdateApplicationDescription(ctx context.Context, id, projectID, description string) (*models.Application, error) UpdateApplicationSchedulingRule(ctx context.Context, id, projectID string, schedulingRule models.SchedulingRule) (*models.Application, error) UpdateApplicationMetricEndpointConfigs(ctx context.Context, id, projectID string, metricEndpointConfigs map[string]models.MetricEndpointConfig) (*models.Application, error) DeleteApplication(ctx context.Context, id, projectID string) error }
type Connections ¶
type Connections interface { CreateConnection(ctx context.Context, projectID, name string, protocol models.Protocol, port uint) (*models.Connection, error) GetConnection(ctx context.Context, id, projectID string) (*models.Connection, error) LookupConnection(ctx context.Context, name, projectID string) (*models.Connection, error) ListConnections(ctx context.Context, projectID string) ([]models.Connection, error) UpdateConnection(ctx context.Context, id, projectID, name string, protocol models.Protocol, port uint) (*models.Connection, error) DeleteConnection(ctx context.Context, id, projectID string) error }
type DeviceAccessKeys ¶
type DeviceAccessKeys interface { CreateDeviceAccessKey(ctx context.Context, projectID, deviceID, hash string) (*models.DeviceAccessKey, error) GetDeviceAccessKey(ctx context.Context, id, projectID string) (*models.DeviceAccessKey, error) ValidateDeviceAccessKey(ctx context.Context, projectID, hash string) (*models.DeviceAccessKey, error) }
type DeviceApplicationStatuses ¶
type DeviceApplicationStatuses interface { SetDeviceApplicationStatus(ctx context.Context, projectID, deviceID, applicationID, currentReleaseID string) error GetDeviceApplicationStatus(ctx context.Context, projectID, deviceID, applicationID string) (*models.DeviceApplicationStatus, error) ListDeviceApplicationStatuses(ctx context.Context, projectID, deviceID string) ([]models.DeviceApplicationStatus, error) ListAllDeviceApplicationStatuses(ctx context.Context, projectID string) ([]models.DeviceApplicationStatus, error) DeleteDeviceApplicationStatus(ctx context.Context, projectID, deviceID, applicationID string) error }
type DeviceRegistrationTokens ¶
type DeviceRegistrationTokens interface { CreateDeviceRegistrationToken(ctx context.Context, projectID, name, description string, maxRegistrations *int) (*models.DeviceRegistrationToken, error) GetDeviceRegistrationToken(ctx context.Context, tokenID, projectID string) (*models.DeviceRegistrationToken, error) LookupDeviceRegistrationToken(ctx context.Context, name, projectID string) (*models.DeviceRegistrationToken, error) ListDeviceRegistrationTokens(ctx context.Context, projectID string) ([]models.DeviceRegistrationToken, error) UpdateDeviceRegistrationToken(ctx context.Context, tokenID, projectID, name, description string, maxRegistrations *int) (*models.DeviceRegistrationToken, error) DeleteDeviceRegistrationToken(ctx context.Context, tokenID, projectID string) error SetDeviceRegistrationTokenLabel(ctx context.Context, tokenID, projectID, key, value string) (*string, error) DeleteDeviceRegistrationTokenLabel(ctx context.Context, tokenID, projectID, key string) error SetDeviceRegistrationTokenEnvironmentVariable(ctx context.Context, tokenID, projectID, key, value string) (*string, error) DeleteDeviceRegistrationTokenEnvironmentVariable(ctx context.Context, tokenID, projectID, key string) error }
type DeviceServiceStates ¶
type DeviceServiceStates interface { SetDeviceServiceState(ctx context.Context, projectID, deviceID, applicationID, service string, state models.ServiceState, errorMessage string) error GetDeviceServiceState(ctx context.Context, projectID, deviceID, applicationID, service string) (*models.DeviceServiceState, error) GetDeviceServiceStates(ctx context.Context, projectID, deviceID, applicationID string) ([]models.DeviceServiceState, error) ListApplicationServiceStateCounts(ctx context.Context, projectID, applicationID string) ([]models.ServiceStateCount, error) ListDeviceServiceStates(ctx context.Context, projectID, deviceID string) ([]models.DeviceServiceState, error) ListAllDeviceServiceStates(ctx context.Context, projectID string) ([]models.DeviceServiceState, error) DeleteDeviceServiceState(ctx context.Context, projectID, deviceID, applicationID, service string) error }
type DeviceServiceStatuses ¶
type DeviceServiceStatuses interface { SetDeviceServiceStatus(ctx context.Context, projectID, deviceID, applicationID, service, currentReleaseID string) error GetDeviceServiceStatus(ctx context.Context, projectID, deviceID, applicationID, service string) (*models.DeviceServiceStatus, error) GetDeviceServiceStatuses(ctx context.Context, projectID, deviceID, applicationID string) ([]models.DeviceServiceStatus, error) ListDeviceServiceStatuses(ctx context.Context, projectID, deviceID string) ([]models.DeviceServiceStatus, error) DeleteDeviceServiceStatus(ctx context.Context, projectID, deviceID, applicationID, service string) error }
type Devices ¶
type Devices interface { CreateDevice(ctx context.Context, projectID, name, registrationTokenID string, deviceLabels, deviceEnvironmentVariables map[string]string) (*models.Device, error) GetDevice(ctx context.Context, deviceID, projectID string) (*models.Device, error) LookupDevice(ctx context.Context, name, projectID string) (*models.Device, error) ListDevices(ctx context.Context, projectID, searchQuery string) ([]models.Device, error) UpdateDeviceName(ctx context.Context, deviceID, projectID, name string) (*models.Device, error) DeleteDevice(ctx context.Context, deviceID, projectID string) error SetDeviceInfo(ctx context.Context, deviceID, projectID string, deviceInfo models.DeviceInfo) (*models.Device, error) UpdateDeviceLastSeenAt(ctx context.Context, deviceID, projectID string) error ListAllDeviceLabelKeys(ctx context.Context, projectID string) ([]string, error) SetDeviceLabel(ctx context.Context, deviceID, projectID, key, value string) (*string, error) DeleteDeviceLabel(ctx context.Context, deviceID, projectID, key string) error SetDeviceEnvironmentVariable(ctx context.Context, deviceID, projectID, key, value string) (*string, error) DeleteDeviceEnvironmentVariable(ctx context.Context, deviceID, projectID, key string) error }
type ExternalUsers ¶
type ExternalUsers interface { CreateExternalUser(ctx context.Context, providerName, providerID, email string, info map[string]interface{}) (*models.ExternalUser, error) GetExternalUser(ctx context.Context, id string) (*models.ExternalUser, error) GetExternalUserByProviderID(ctx context.Context, providerName, providerID string) (*models.ExternalUser, error) }
type InternalUsers ¶
type InternalUsers interface { CreateInternalUser(ctx context.Context, email, passwordHash string) (*models.InternalUser, error) GetInternalUser(ctx context.Context, id string) (*models.InternalUser, error) LookupInternalUser(ctx context.Context, email string) (*models.InternalUser, error) ValidateInternalUser(ctx context.Context, id, passwordHash string) (*models.InternalUser, error) ValidateInternalUserWithEmail(ctx context.Context, email, passwordHash string) (*models.InternalUser, error) UpdateInternalUserPasswordHash(ctx context.Context, id, passwordHash string) (*models.InternalUser, error) }
type MembershipRoleBindings ¶
type MembershipRoleBindings interface { CreateMembershipRoleBinding(ctx context.Context, userID, roleID, projectID string) (*models.MembershipRoleBinding, error) GetMembershipRoleBinding(ctx context.Context, userID, roleID, projectID string) (*models.MembershipRoleBinding, error) ListMembershipRoleBindings(ctx context.Context, userID, projectID string) ([]models.MembershipRoleBinding, error) DeleteMembershipRoleBinding(ctx context.Context, userID, roleID, projectID string) error }
type Memberships ¶
type Memberships interface { CreateMembership(ctx context.Context, userID, projectID string) (*models.Membership, error) GetMembership(ctx context.Context, userID, projectID string) (*models.Membership, error) ListMembershipsByUser(ctx context.Context, userID string) ([]models.Membership, error) ListMembershipsByProject(ctx context.Context, projectID string) ([]models.Membership, error) DeleteMembership(ctx context.Context, userID, projectID string) error }
type MetricConfigs ¶
type MetricConfigs interface { GetProjectMetricsConfig(ctx context.Context, projectID string) (*models.ProjectMetricsConfig, error) SetProjectMetricsConfig(ctx context.Context, projectID string, value models.ProjectMetricsConfig) error GetDeviceMetricsConfig(ctx context.Context, projectID string) (*models.DeviceMetricsConfig, error) SetDeviceMetricsConfig(ctx context.Context, projectID string, value models.DeviceMetricsConfig) error GetServiceMetricsConfigs(ctx context.Context, projectID string) ([]models.ServiceMetricsConfig, error) SetServiceMetricsConfigs(ctx context.Context, projectID string, value []models.ServiceMetricsConfig) error }
type PasswordRecoveryTokens ¶
type PasswordRecoveryTokens interface { CreatePasswordRecoveryToken(ctx context.Context, userID, hash string) (*models.PasswordRecoveryToken, error) GetPasswordRecoveryToken(ctx context.Context, id string) (*models.PasswordRecoveryToken, error) ValidatePasswordRecoveryToken(ctx context.Context, hash string) (*models.PasswordRecoveryToken, error) }
type ProjectDeviceCounts ¶
type Projects ¶
type Projects interface { CreateProject(ctx context.Context, name string) (*models.Project, error) GetProject(ctx context.Context, id string) (*models.Project, error) LookupProject(ctx context.Context, name string) (*models.Project, error) ListProjects(ctx context.Context) ([]models.Project, error) UpdateProject(ctx context.Context, id, name, datadogApiKey string) (*models.Project, error) DeleteProject(ctx context.Context, id string) error }
type RegistrationTokens ¶
type RegistrationTokens interface { CreateRegistrationToken(ctx context.Context, internalUserID, hash string) (*models.RegistrationToken, error) GetRegistrationToken(ctx context.Context, id string) (*models.RegistrationToken, error) ValidateRegistrationToken(ctx context.Context, hash string) (*models.RegistrationToken, error) }
type ReleaseDeviceCounts ¶
type Releases ¶
type Releases interface { CreateRelease(ctx context.Context, projectID, applicationID, yamlConfig, jsonConfig, createdByUserID, createdByServiceAccountID string) (*models.Release, error) GetRelease(ctx context.Context, id, projectID, applicationID string) (*models.Release, error) GetReleaseByNumber(ctx context.Context, id uint32, projectID, applicationID string) (*models.Release, error) GetLatestRelease(ctx context.Context, projectID, applicationID string) (*models.Release, error) ListReleases(ctx context.Context, projectID, applicationID string) ([]models.Release, error) }
type Roles ¶
type Roles interface { CreateRole(ctx context.Context, projectID, name, description, config string) (*models.Role, error) GetRole(ctx context.Context, id, projectID string) (*models.Role, error) LookupRole(ctx context.Context, name, projectID string) (*models.Role, error) ListRoles(ctx context.Context, projectID string) ([]models.Role, error) UpdateRole(ctx context.Context, id, projectID, name, description, config string) (*models.Role, error) DeleteRole(ctx context.Context, id, projectID string) error }
type ServiceAccountAccessKeys ¶
type ServiceAccountAccessKeys interface { CreateServiceAccountAccessKey(ctx context.Context, projectID, serviceAccountID string, hash, description string) (*models.ServiceAccountAccessKey, error) GetServiceAccountAccessKey(ctx context.Context, id, projectID string) (*models.ServiceAccountAccessKey, error) ValidateServiceAccountAccessKey(ctx context.Context, hash string) (*models.ServiceAccountAccessKey, error) ListServiceAccountAccessKeys(ctx context.Context, projectID, serviceAccountID string) ([]models.ServiceAccountAccessKey, error) DeleteServiceAccountAccessKey(ctx context.Context, id, projectID string) error }
type ServiceAccountRoleBindings ¶
type ServiceAccountRoleBindings interface { CreateServiceAccountRoleBinding(ctx context.Context, serviceAccountID, roleID, projectID string) (*models.ServiceAccountRoleBinding, error) GetServiceAccountRoleBinding(ctx context.Context, serviceAccountID, roleID, projectID string) (*models.ServiceAccountRoleBinding, error) ListServiceAccountRoleBindings(ctx context.Context, serviceAccountID, projectID string) ([]models.ServiceAccountRoleBinding, error) DeleteServiceAccountRoleBinding(ctx context.Context, serviceAccountID, roleID, projectID string) error }
type ServiceAccounts ¶
type ServiceAccounts interface { CreateServiceAccount(ctx context.Context, projectID, name, description string) (*models.ServiceAccount, error) GetServiceAccount(ctx context.Context, id, projectID string) (*models.ServiceAccount, error) LookupServiceAccount(ctx context.Context, name, projectID string) (*models.ServiceAccount, error) ListServiceAccounts(ctx context.Context, projectID string) ([]models.ServiceAccount, error) UpdateServiceAccount(ctx context.Context, id, projectID, name, description string) (*models.ServiceAccount, error) DeleteServiceAccount(ctx context.Context, id, projectID string) error }
type Sessions ¶
type Sessions interface { CreateSession(ctx context.Context, userID string, hash string) (*models.Session, error) GetSession(ctx context.Context, id string) (*models.Session, error) ValidateSession(ctx context.Context, hash string) (*models.Session, error) DeleteSession(ctx context.Context, id string) error }
type UserAccessKeys ¶
type UserAccessKeys interface { CreateUserAccessKey(ctx context.Context, userID string, hash, description string) (*models.UserAccessKey, error) GetUserAccessKey(ctx context.Context, id string) (*models.UserAccessKey, error) ValidateUserAccessKey(ctx context.Context, hash string) (*models.UserAccessKey, error) ListUserAccessKeys(ctx context.Context, userID string) ([]models.UserAccessKey, error) DeleteUserAccessKey(ctx context.Context, id string) error }
type Users ¶
type Users interface { InitializeUser(ctx context.Context, internalUserID, externalUserID *string) (*models.User, error) GetUser(ctx context.Context, id string) (*models.User, error) GetUserByInternalID(ctx context.Context, internalUserID string) (*models.User, error) GetUserByExternalID(ctx context.Context, externalUserID string) (*models.User, error) UpdateUserName(ctx context.Context, id, name string) (*models.User, error) }
Click to show internal directories.
Click to hide internal directories.