model

package
v0.0.0-...-b6b001a Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CO1 = "Apple"
	CO2 = "Google"
	CO3 = "Microsoft"
	CO4 = "Amazon"
)
View Source
const (
	COLLECTION_KEY = "email"
	ADMIN          = "admin"
)

Variables

This section is empty.

Functions

func GetCustomOrgName

func GetCustomOrgName(org string) string

func GetTime

func GetTime(timestamp *timestamp.Timestamp) string

func IsAdmin

func IsAdmin(role string) bool

Types

type HistoryData

type HistoryData struct {
	EmailKey     string `json:"emailKey"`
	TxID         string `json:"txId"`
	QueryCreator string `json:"creator"`
	Query        string `json:"query"`
	TargetOrg    string `json:"targetOrg"`
	Time         string `json:"time"`
	Remarks      string `json:"remarks"`
}

type LedgerAccess

type LedgerAccess int32
const (
	ALL          LedgerAccess = 1
	WRITE        LedgerAccess = 2
	READ         LedgerAccess = 3
	DELETE       LedgerAccess = 4
	REMOVEACCESS LedgerAccess = 5
	NOACCESS     LedgerAccess = 6
)

func (LedgerAccess) AllAccess

func (access LedgerAccess) AllAccess() bool

func (LedgerAccess) DeleteAccess

func (access LedgerAccess) DeleteAccess() bool

func (LedgerAccess) Int

func (access LedgerAccess) Int() int32

func (LedgerAccess) NoAccess

func (access LedgerAccess) NoAccess() bool

func (LedgerAccess) ReadAccess

func (access LedgerAccess) ReadAccess() bool

func (LedgerAccess) RemoveAccess

func (access LedgerAccess) RemoveAccess() bool

func (LedgerAccess) String

func (access LedgerAccess) String() string

func (LedgerAccess) WriteAccess

func (access LedgerAccess) WriteAccess() bool

type Target

type Target struct {
	Access               int32    `protobuf:"varint,1,opt,name=access,proto3" json:"access,omitempty"`
	Remarks              string   `protobuf:"bytes,2,opt,name=remarks,proto3" json:"remarks,omitempty"`
	TransactionHash      string   `protobuf:"bytes,3,opt,name=transactionHash,proto3" json:"transactionHash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Target) Descriptor

func (*Target) Descriptor() ([]byte, []int)

func (*Target) GetAccess

func (m *Target) GetAccess() int32

func (*Target) GetRemarks

func (m *Target) GetRemarks() string

func (*Target) GetTransactionHash

func (m *Target) GetTransactionHash() string

func (*Target) ProtoMessage

func (*Target) ProtoMessage()

func (*Target) Reset

func (m *Target) Reset()

func (*Target) String

func (m *Target) String() string

func (*Target) XXX_DiscardUnknown

func (m *Target) XXX_DiscardUnknown()

func (*Target) XXX_Marshal

func (m *Target) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Target) XXX_Merge

func (dst *Target) XXX_Merge(src proto.Message)

func (*Target) XXX_Size

func (m *Target) XXX_Size() int

func (*Target) XXX_Unmarshal

func (m *Target) XXX_Unmarshal(b []byte) error

type User

type User struct {
	ID          string `json:"id"`
	Email       string `json:"email"`
	Name        string `json:"name"`
	Mobile      string `json:"mobile"`
	Age         string `json:"age"`
	Salary      string `json:"salary"`
	Owner       string `json:"owner"`
	ShareAccess string `json:"shareAccess"`
	Role        string `json:"role"`
	Targets     string `json:"targets"`
	Time        string `json:"time"`
	Remarks     string `json:"remarks"`
}

Jump to

Keyboard shortcuts

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