model

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: GPL-3.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

View Source
const AdminTable = "HSTX_ADMIN"

AdminTable - Table name

View Source
const ApprovalTable = "HSTX_APPROVAL"

ApprovalTable - Table name

View Source
const ProposalTable = "HSTX_PROPOSAL"

ProposalTable - Table name

View Source
const SuperAdminTable = "HSTX_SUPER_ADMIN"

SuperAdminTable - Table name

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	AdminID string `json:"AdminID"`
	Name    string `json:"Name"`
	Status  string `json:"Status"`
}

Admin who is able be create a Proposal

type Approval

type Approval struct {
	ApprovalID string `json:"ApprovalID"` // set
	ProposalID string `json:"ProposalID"` // args[0] proposalID
	ApproverID string `json:"ApproverID"` // args[0] approverID
	Challenge  string `json:"Challenge"`  // args[0] singned challenge
	Signature  string `json:"Signature"`  // args[0] signature
	Message    string `json:"Message"`    // args[0] singned Message
	Status     string `json:"Status"`     // args[0] approval status: Approved/Rejected
	CreatedAt  string `json:"CreatedAt"`  // set
}

Approval contain a Super Admin's signature to Approve or Reject a Proposal

type Proposal

type Proposal struct {
	ProposalID   string `json:"ProposalID"`   // set
	Message      string `json:"Message"`      // args[0]
	CreatedBy    string `json:"CreatedBy"`    // args[0]: ID of Admin/SAdmin
	Status       string `json:"Status"`       // set
	QuorumNumber int    `json:"QuorumNumber"` // args[0]
	CreatedAt    string `json:"CreatedAt"`    // args[0]
	UpdatedAt    string `json:"UpdatedAt"`    // args[0]
}

Proposal - struct

type SuperAdmin

type SuperAdmin struct {
	SuperAdminID string `json:"SuperAdminID"` // args[0] keyhandle of yubikey and application
	Name         string `json:"Name"`         // args[0] name
	PublicKey    string `json:"PublicKey"`    // args[0] publickey of yubikey (format: pem)
	Status       string `json:"Status"`       // args[0] A/I (active/inactive)
}

SuperAdmin , who has permission to approve or reject a proposal, is a member in the Quorum

Jump to

Keyboard shortcuts

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