signcert

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

README

Fabric Signcert activity

This Flogo activity contribution can be configured to retrieve a requesting user's signing certificate.

Configuration and Inputs

This operation can specify a network name and a user name of format user@org, e.g.,

    "activity": {
        "ref": "#signcert",
        "settings": {
            "connectionName": "=$property[\"NETWORK\"]",
            "userOrgOnly": false
        },
        "input": {
            "userName": "=$flow.user"
        }
    }

It will return the text info about the user's signing certificate in the format similar to output of

openssl x509 -noout -text -in cert.pem

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NetworkConfig []byte

NetworkConfig is the content of fabric network config file

Functions

func InitializeNetwork added in v0.0.2

func InitializeNetwork(config []byte)

InitializeNetwork can be called to initialize Fabric network config

func New

New creates a new Activity

func ReadFile added in v0.0.2

func ReadFile(filePath string) ([]byte, error)

ReadFile returns content of a specified file

func Subst added in v0.0.2

func Subst(path string) string

Subst replaces instances of '${VARNAME}' (eg ${GOPATH}) with the variable. Variables names that are not set by the SDK are replaced with the environment variable.

func UserCertificate added in v0.0.2

func UserCertificate(user string) string

UserCertificate returns certificate string of a specified user@org

Types

type Activity

type Activity struct {
}

Activity fabric signcert activity struct

func (*Activity) Eval

func (a *Activity) Eval(ctx activity.Context) (done bool, err error)

Eval implements activity.Activity.Eval

func (*Activity) Metadata

func (a *Activity) Metadata() *activity.Metadata

Metadata implements activity.Activity.Metadata

type Input

type Input struct {
	OrgName  string `md:"orgName"`
	UserName string `md:"userName,required"`
}

Input of the activity

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

FromMap sets activity input values from a map

func (*Input) ToMap

func (i *Input) ToMap() map[string]interface{}

ToMap converts activity input to a map

type Output

type Output struct {
	Code    int         `md:"code"`
	Message string      `md:"message"`
	Result  interface{} `md:"result"`
}

Output of the activity

func (*Output) FromMap

func (o *Output) FromMap(values map[string]interface{}) error

FromMap sets activity output values from a map

func (*Output) ToMap

func (o *Output) ToMap() map[string]interface{}

ToMap converts activity output to a map

type Settings

type Settings struct {
}

Settings of the activity

Jump to

Keyboard shortcuts

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