handlers

package
v0.0.0-...-6b2b62e Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package handlers provides handlers for the api package.

Package handlers provides handlers for the api package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateGroupSeedSignature

func GenerateGroupSeedSignature(result *GroupSeed) error

func ToPbGroupSeed

func ToPbGroupSeed(s GroupSeed) chestnutpb.GroupSeed

ToPbGroupSeed convert `api.GroupSeed` to `quorumpb.GroupSeed`

Types

type CreateGroupParam

type CreateGroupParam struct {
	GroupName      string `from:"group_name"      json:"group_name"      validate:"required"`
	ConsensusType  string `from:"consensus_type"  json:"consensus_type"  validate:"required,oneof=pos poa"`
	EncryptionType string `from:"encryption_type" json:"encryption_type" validate:"required,oneof=public private"`
	AppKey         string `from:"app_key"         json:"app_key"         validate:"required,max=20,min=4"`
}

type GroupSeed

type GroupSeed struct {
	GenesisBlock   *chestnutpb.Block `json:"genesis_block" validate:"required"`
	GroupId        string            `json:"group_id" validate:"required"`
	GroupName      string            `json:"group_name" validate:"required"`
	OwnerPubkey    string            `json:"owner_pubkey" validate:"required"`
	ConsensusType  string            `json:"consensus_type" validate:"required,oneof=pos poa"`
	EncryptionType string            `json:"encryption_type" validate:"required,oneof=public private"`
	CipherKey      string            `json:"cipher_key" validate:"required"`
	AppKey         string            `json:"app_key" validate:"required"`
	Signature      string            `json:"signature" validate:"required"`
}

func CreateGroup

func CreateGroup(params *CreateGroupParam, nodeoptions *options.NodeOptions, appdb *appdata.AppDb) (*GroupSeed, error)

func FromPbGroupSeed

func FromPbGroupSeed(s *chestnutpb.GroupSeed) GroupSeed

FromPbGroupSeed convert `quorumpb.GroupSeed` to `api.GroupSeed`

Jump to

Keyboard shortcuts

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