models

package
v0.0.0-...-27ac458 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthPrincipal

type AuthPrincipal struct {
	// The API key used to authenticate the request.
	Authenticated bool
}

type CreateKeyBody

type CreateKeyBody struct {

	// Custom attributes (optional)
	Attributes interface{} `json:"attributes,omitempty"`

	// Organization ID (optional)
	OrganizationID *string `json:"organizationId,omitempty"`

	// Project ID (optional)
	ProjectID *string `json:"projectId,omitempty"`

	// User ID (optional)
	UserID *string `json:"userId,omitempty"`
}

CreateKeyBody create key body

swagger:model CreateKeyBody

func (*CreateKeyBody) ContextValidate

func (m *CreateKeyBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this create key body based on context it is used

func (*CreateKeyBody) MarshalBinary

func (m *CreateKeyBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateKeyBody) UnmarshalBinary

func (m *CreateKeyBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateKeyBody) Validate

func (m *CreateKeyBody) Validate(formats strfmt.Registry) error

Validate validates this create key body

type CreateKeyResult

type CreateKeyResult struct {

	// Database record id
	ID string `json:"id,omitempty"`

	// Unmasked API key
	Key string `json:"key,omitempty"`
}

CreateKeyResult create key result

swagger:model CreateKeyResult

func (*CreateKeyResult) ContextValidate

func (m *CreateKeyResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this create key result based on context it is used

func (*CreateKeyResult) MarshalBinary

func (m *CreateKeyResult) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*CreateKeyResult) UnmarshalBinary

func (m *CreateKeyResult) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*CreateKeyResult) Validate

func (m *CreateKeyResult) Validate(formats strfmt.Registry) error

Validate validates this create key result

type GetKeysResult

type GetKeysResult struct {

	// Custom attributes (optional)
	Attributes interface{} `json:"attributes,omitempty"`

	// Database record id
	ID string `json:"id,omitempty"`

	// Masked API key (asterisks in the middle)
	Key string `json:"key,omitempty"`

	// Organization ID (optional)
	OrganizationID *string `json:"organizationId,omitempty"`

	// Project ID (optional)
	ProjectID *string `json:"projectId,omitempty"`

	// User ID (optional)
	UserID *string `json:"userId,omitempty"`
}

GetKeysResult get keys result

swagger:model GetKeysResult

func (*GetKeysResult) ContextValidate

func (m *GetKeysResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this get keys result based on context it is used

func (*GetKeysResult) MarshalBinary

func (m *GetKeysResult) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetKeysResult) UnmarshalBinary

func (m *GetKeysResult) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetKeysResult) Validate

func (m *GetKeysResult) Validate(formats strfmt.Registry) error

Validate validates this get keys result

type Key

type Key struct {
	gorm.Model

	ID  string `gorm:"primaryKey"`
	Key string

	OrganizationID *string
	ProjectID      *string
	UserID         *string
	Attributes     interface{} `sql:"type:jsonb; not null;" gorm:"type:jsonb; default:'{}'; not null"`

	CreatedAt time.Time // Automatically managed by GORM for creation time
	UpdatedAt time.Time // Automatically managed by GORM for update time
}

func (*Key) BeforeCreate

func (key *Key) BeforeCreate(tx *gorm.DB) (err error)

Jump to

Keyboard shortcuts

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