http

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(signer msp.SigningIdentity, opts ...Opt) (*Client, error)

func (*Client) AffiliationCreate

func (c *Client) AffiliationCreate(ctx context.Context, name string, opts ...ca.AffiliationOpt) error

func (*Client) AffiliationDelete

func (c *Client) AffiliationDelete(ctx context.Context, name string, opts ...ca.AffiliationOpt) ([]ca.Identity, []ca.Affiliation, error)

func (*Client) AffiliationList

func (c *Client) AffiliationList(ctx context.Context, rootAffiliation ...string) ([]ca.Identity, []ca.Affiliation, error)

func (*Client) CAInfo

func (c *Client) CAInfo(ctx context.Context) (*ca.ResponseCAInfo, error)

func (*Client) CertificateList

func (c *Client) CertificateList(ctx context.Context, opts ...ca.CertificateListOpt) ([]*x509.Certificate, error)

func (*Client) Enroll

func (c *Client) Enroll(ctx context.Context, name, secret string, req *x509.CertificateRequest, opts ...ca.EnrollOpt) (*x509.Certificate, interface{}, error)

func (*Client) IdentityGet

func (c *Client) IdentityGet(ctx context.Context, enrollId string) (*ca.Identity, error)

func (*Client) IdentityList

func (c *Client) IdentityList(ctx context.Context) ([]ca.Identity, error)

func (*Client) Register

func (c *Client) Register(ctx context.Context, req ca.RegistrationRequest) (string, error)

func (*Client) Revoke

type Opt

type Opt func(c *Client) error

func WithBytesConfig

func WithBytesConfig(configBytes []byte) Opt

func WithHTTPClient

func WithHTTPClient(client *http.Client) Opt

func WithRawConfig

func WithRawConfig(conf *config.CAConfig) Opt

func WithYamlConfig

func WithYamlConfig(configPath string) Opt

WithYamlConfig allows using YAML config from file

Jump to

Keyboard shortcuts

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