server

package
v0.0.0-...-d7e0018 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenRequest

type AccessTokenRequest struct {
	RefreshToken string `json:"refresh_token"`
	Namespace    string `json:"namespace"`
}

type AccessTokenValidationRequest

type AccessTokenValidationRequest struct {
	AccessToken string `json:"access_token"`
	Namespace   string `json:"namespace"`
}

type AdminType

type AdminType bool
const (
	QuidAdmin AdminType = false
	NsAdmin   AdminType = true
)

func (AdminType) String

func (t AdminType) String() string

type AdministratorDeletion

type AdministratorDeletion struct {
	UsrID int64 `json:"usr_id"`
	NsID  int64 `json:"ns_id"`
}

type AdministratorsCreation

type AdministratorsCreation struct {
	UsrIDs []int64 `json:"usr_ids"`
	NsID   int64   `json:"ns_id"`
}

type Availability

type Availability struct {
	ID     int64 `json:"id"`
	Enable bool
}

type Group

type Group struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	ID        int64  `json:"id"`
}

Group : base model.

type GroupCreation

type GroupCreation struct {
	Name string `json:"name"`
	NsID int64  `json:"ns_id"`
}

type InfoRequest

type InfoRequest struct {
	ID           int64  `json:"id"`
	EncodingForm string `json:"encoding_form"`
}

type MaxTTLRequest

type MaxTTLRequest struct {
	ID     int64  `json:"id"`
	MaxTTL string `json:"max_ttl"`
}

type NSInfo

type NSInfo struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

type NameRequest

type NameRequest struct {
	Name string `json:"name"`
}

type Namespace

type Namespace struct {
	ID            int64  `json:"id"                      db:"id"`
	Name          string `json:"name"                    db:"name"`
	Alg           string `json:"alg"                     db:"alg"`
	RefreshKey    []byte `json:"-"                       db:"refresh_key"`
	AccessKey     []byte `json:"-"                       db:"access_key"`
	MaxRefreshTTL string `json:"max_refresh_ttl"         db:"max_refresh_ttl"`
	MaxAccessTTL  string `json:"max_access_ttl"          db:"max_access_ttl"`
	Enabled       bool   `json:"public_endpoint_enabled" db:"public_endpoint_enabled"`
}

Namespace : base model.

type NamespaceCreation

type NamespaceCreation struct {
	Name           string `json:"name"`
	Alg            string `json:"alg"`
	MaxTTL         string `json:"max_ttl"`
	RefreshMaxTTL  string `json:"refresh_max_ttl"`
	EnableEndpoint bool   `json:"enable_endpoint"`
}

type NamespaceIDRequest

type NamespaceIDRequest struct {
	NsID int64 `json:"ns_id"`
}

type NamespaceInfo

type NamespaceInfo struct {
	Groups   []Group `json:"groups"`
	NumUsers int     `json:"num_users"`
}

NamespaceInfo : base model.

type NamespaceRequest

type NamespaceRequest struct {
	Namespace    string `json:"namespace"`
	EncodingForm string `json:"encoding_form"`
}

type NonAdminUsersRequest

type NonAdminUsersRequest struct {
	Pattern string `json:"pattern"`
	NsID    int64  `json:"ns_id"`
}

type Org

type Org struct {
	Name string `json:"name"`
	ID   int64  `json:"id"`
}

Org : base model.

type PasswordRequest

type PasswordRequest struct {
	Username  string `json:"username"`
	Password  string `json:"password"`
	Namespace string `json:"namespace"`
}

type PublicKeyResponse

type PublicKeyResponse struct {
	Alg string `json:"alg"`
	Key []byte `json:"key"`
}

type RefreshMaxTTLRequest

type RefreshMaxTTLRequest struct {
	ID            int64  `json:"id"`
	RefreshMaxTTL string `json:"refresh_max_ttl"`
}

type StatusResponse

type StatusResponse struct {
	AdminType string `json:"admin_type"`
	Username  string `json:"username"`
	Ns        NSInfo `json:"ns"`
}

type User

type User struct {
	DateCreated  time.Time `json:"date_created"        db:"date_created"`
	ID           int64     `json:"id"                  db:"id"`
	Name         string    `json:"name"                db:"name"`
	PasswordHash string    `json:"-"                   db:"password_hash"`
	Namespace    string    `json:"namespace,omitempty" db:"namespace"`
	Org          string    `json:"org,omitempty"       db:"org"`
	Groups       []Group   `json:"groups,omitempty"    db:"groups"`
	Enabled      bool      `json:"enabled"             db:"enabled"`
}

User : base model.

type UserCreation

type UserCreation struct {
	Username string `json:"username"`
	Password string `json:"password"`
	NsID     int64  `json:"ns_id"`
}

type UserGroupRequest

type UserGroupRequest struct {
	UsrID int64 `json:"usr_id"`
	GrpID int64 `json:"grp_id"`
	NsID  int64 `json:"ns_id"`
}

type UserOrgRequest

type UserOrgRequest struct {
	UsrID int64 `json:"usr_id"`
	OrgID int64 `json:"org_id"`
}

type UserRequest

type UserRequest struct {
	ID   int64 `json:"id"`
	NsID int64 `json:"ns_id"`
}

type UserSetEnabled

type UserSetEnabled struct {
	ID      int64 `json:"id"`
	Enabled bool  `json:"enabled"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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