decoder

package module
v0.0.0-...-78f2cfe Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Overview

Copyright 2022 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2022 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoPluginDecoderContext

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

func NewGoPluginDecoderContext

func NewGoPluginDecoderContext(path string) (*GoPluginDecoderContext, error)

type GoPluginDecoderManager

type GoPluginDecoderManager struct {
	DispatchTable map[string]*GoPluginDecoderContext
}

func (GoPluginDecoderManager) Close

func (o GoPluginDecoderManager) Close() error

func (GoPluginDecoderManager) Dispatch

func (o GoPluginDecoderManager) Dispatch(
	mediaType string,
	data []byte,
) (*EndorsementDecoderResponse, error)

func (*GoPluginDecoderManager) Init

func (o *GoPluginDecoderManager) Init(dir string) error

func (GoPluginDecoderManager) IsSupportedMediaType

func (o GoPluginDecoderManager) IsSupportedMediaType(mediaType string) bool

func (GoPluginDecoderManager) SupportedMediaTypes

func (o GoPluginDecoderManager) SupportedMediaTypes() string

type IDecoder

type IDecoder interface {
	Init(params Params) error
	Close() error
	GetName() string
	GetSupportedMediaTypes() []string
	Decode([]byte) (*EndorsementDecoderResponse, error)
}

type IDecoderManager

type IDecoderManager interface {
	Init(dir string) error
	Close() error
	Dispatch(mediaType string, data []byte) (*EndorsementDecoderResponse, error)
	IsSupportedMediaType(mediaType string) bool
	SupportedMediaTypes() string
}

type Params

type Params map[string]interface{}

type Plugin

type Plugin struct {
	Impl IDecoder
}

func (*Plugin) Client

func (p *Plugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*Plugin) Server

func (p *Plugin) Server(*plugin.MuxBroker) (interface{}, error)

type RPCClient

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

func (RPCClient) Close

func (c RPCClient) Close() error

func (RPCClient) Decode

func (c RPCClient) Decode(data []byte) (*EndorsementDecoderResponse, error)

func (RPCClient) GetName

func (c RPCClient) GetName() string

func (RPCClient) GetSupportedMediaTypes

func (c RPCClient) GetSupportedMediaTypes() []string

func (RPCClient) Init

func (c RPCClient) Init(params Params) error

type RPCServer

type RPCServer struct {
	Impl IDecoder
}

func (RPCServer) Close

func (s RPCServer) Close(unused0 interface{}, unused1 interface{}) error

func (RPCServer) Decode

func (s RPCServer) Decode(data []byte, resp *[]byte) error

func (*RPCServer) GetName

func (s *RPCServer) GetName(args interface{}, resp *string) error

func (*RPCServer) GetSupportedMediaTypes

func (s *RPCServer) GetSupportedMediaTypes(args interface{}, resp *[]string) error

func (*RPCServer) Init

func (s *RPCServer) Init(params Params, unused interface{}) error

Jump to

Keyboard shortcuts

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