types

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Success bool            `json:"success"`
	Message string          `json:"message"`
	Errors  []string        `json:"errors,omitempty"`
	Data    json.RawMessage `json:"data,omitempty"`
}

type ApproveDeviceRequest

type ApproveDeviceRequest struct {
	WrappedProjectKey string `json:"wrapped_project_key"`
}

type ApproveDeviceResponse

type ApproveDeviceResponse struct {
	DeviceApproval DeviceApproval `json:"device_approval"`
}

type CreateProjectRequest added in v0.7.1

type CreateProjectRequest struct {
	Name        string `json:"name"`
	Slug        string `json:"slug"`
	Description string `json:"description,omitempty"`
}

type CreateProjectResponse added in v0.7.1

type CreateProjectResponse struct {
	Project Project `json:"project"`
}

type DeviceApproval

type DeviceApproval struct {
	ID         int    `json:"id"`
	Status     string `json:"status"`
	InsertedAt string `json:"inserted_at"`
	UpdatedAt  string `json:"updated_at"`
	Device     struct {
		ID               int    `json:"id"`
		Name             string `json:"name"`
		PublicKeyEd25519 string `json:"public_key_ed25519"`
		PublicKeyX25519  string `json:"public_key_x25519"`
	} `json:"device"`
	ProjectMembership struct {
		ID     int    `json:"id"`
		Role   string `json:"role"`
		Status string `json:"status"`
		User   struct {
			ID      int    `json:"id"`
			Email   string `json:"email"`
			Name    string `json:"name"`
			Surname string `json:"surname"`
		} `json:"user"`
		Project struct {
			ID           int    `json:"id"`
			Name         string `json:"name"`
			Slug         string `json:"slug"`
			Organization struct {
				ID   int    `json:"id"`
				Name string `json:"name"`
				Slug string `json:"slug"`
			} `json:"organization"`
		} `json:"project"`
	} `json:"project_membership"`
	ApprovedByUser *struct {
		ID      int    `json:"id"`
		Email   string `json:"email"`
		Name    string `json:"name"`
		Surname string `json:"surname"`
	} `json:"approved_by_user"`
}

type DeviceRegistrationRequest

type DeviceRegistrationRequest struct {
	Token            string `json:"token"`
	Name             string `json:"name"`
	PublicKeyEd25519 string `json:"public_key_ed25519"`
	PublicKeyX25519  string `json:"public_key_x25519"`
}

type DeviceRegistrationResponse

type DeviceRegistrationResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
	Device  struct {
		DeviceID  string `json:"device_id"`
		Name      string `json:"name"`
		CreatedAt string `json:"created_at"`
	} `json:"device"`
}

type Environment added in v0.6.0

type Environment struct {
	ID           int      `json:"id"`
	Name         string   `json:"name"`
	Slug         string   `json:"slug"`
	Description  string   `json:"description"`
	ProjectID    int      `json:"project_id"`
	SecretsCount int      `json:"secrets_count"`
	Secrets      []Secret `json:"secrets"`
}

type ErrorResponse

type ErrorResponse struct {
	Error   string `json:"error"`
	Message string `json:"message"`
}

type GetDeviceApprovalResponse

type GetDeviceApprovalResponse struct {
	DeviceApproval DeviceApproval `json:"device_approval"`
}

type GetEnvironmentResponse added in v0.6.0

type GetEnvironmentResponse struct {
	Environment Environment `json:"environment"`
}

type GetProjectKeyResponse added in v0.4.0

type GetProjectKeyResponse struct {
	WrappedProjectKey string `json:"wrapped_project_key"`
	KeyVersion        int    `json:"key_version"`
}

type GetSecretResponse

type GetSecretResponse struct {
	Secret SecretWithValue `json:"secret"`
}

type InitializeProjectKeyRequest added in v0.4.0

type InitializeProjectKeyRequest struct {
	WrappedProjectKey string `json:"wrapped_project_key"`
}

type InitializeProjectKeyResponse added in v0.4.0

type InitializeProjectKeyResponse struct {
	Success bool    `json:"success"`
	Message string  `json:"message"`
	Project Project `json:"project"`
}

type ListDeviceApprovalsResponse

type ListDeviceApprovalsResponse struct {
	DeviceApprovals []DeviceApproval `json:"device_approvals"`
}

type ListEnvironmentsResponse added in v0.6.0

type ListEnvironmentsResponse struct {
	Environments []Environment `json:"environments"`
}

type ListProjectsResponse added in v0.4.0

type ListProjectsResponse struct {
	Projects []Project `json:"projects"`
}

type ListSecretsResponse

type ListSecretsResponse struct {
	Secrets []Secret `json:"secrets"`
	Count   int      `json:"count"`
}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type LoginResponse

type LoginResponse struct {
	Token string `json:"token"`
	User  struct {
		ID      int    `json:"id"`
		Email   string `json:"email"`
		Name    string `json:"name"`
		Surname string `json:"surname"`
	} `json:"user"`
}

type Project added in v0.4.0

type Project struct {
	ID             int    `json:"id"`
	Name           string `json:"name"`
	Slug           string `json:"slug"`
	CompositeSlug  string `json:"composite_slug"`
	Description    string `json:"description"`
	KeyInitialized bool   `json:"key_initialized"`
	KeyVersion     int    `json:"key_version"`
	Role           string `json:"role"`
	Organization   struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
		Slug string `json:"slug"`
	} `json:"organization"`
}

type RejectDeviceResponse

type RejectDeviceResponse struct {
	DeviceApproval DeviceApproval `json:"device_approval"`
}

type Secret

type Secret struct {
	ID              int    `json:"id"`
	Key             string `json:"key"`
	Version         int    `json:"version"`
	ProjectID       int    `json:"project_id"`
	CreatedByDevice struct {
		ID       int    `json:"id"`
		DeviceID string `json:"device_id"`
		Name     string `json:"name"`
	} `json:"created_by_device"`
	InsertedAt string `json:"inserted_at"`
	UpdatedAt  string `json:"updated_at"`
}

type SecretWithValue

type SecretWithValue struct {
	Secret
	EncryptedValue string `json:"encrypted_value"`
	Nonce          string `json:"nonce"`
}

type SetSecretRequest

type SetSecretRequest struct {
	Key            string `json:"key"`
	EncryptedValue string `json:"encrypted_value"`
	Nonce          string `json:"nonce"`
	Description    string `json:"description,omitempty"`
}

type SetSecretResponse

type SetSecretResponse struct {
	Secret Secret `json:"secret"`
}

type ValidationErrorResponse

type ValidationErrorResponse struct {
	Success bool                `json:"success"`
	Message string              `json:"message"`
	Errors  map[string][]string `json:"errors,omitempty"`
}

Jump to

Keyboard shortcuts

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