discharger

package
v0.0.0-...-ba1c585 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package discharger defines an interface for obtaining discharges for third-party caveats.

Index

Constants

This section is empty.

Variables

View Source
var DischargerDesc rpc.InterfaceDesc = descDischarger

DischargerDesc describes the Discharger interface.

View Source
var (

	// Indicates that the Caveat does not require a discharge
	ErrNotAThirdPartyCaveat = verror.Register("v.io/x/ref/services/discharger.NotAThirdPartyCaveat", verror.NoRetry, "{1:}{2:} discharges are not required for non-third-party caveats (id: {c.id})")
)

Functions

func NewErrNotAThirdPartyCaveat

func NewErrNotAThirdPartyCaveat(ctx *context.T, c security.Caveat) error

NewErrNotAThirdPartyCaveat returns an error with the ErrNotAThirdPartyCaveat ID.

Types

type DischargerClientMethods

type DischargerClientMethods interface {
	// Discharge is called by a principal that holds a blessing with a third
	// party caveat and seeks to get a discharge that proves the fulfillment of
	// this caveat.
	Discharge(_ *context.T, Caveat security.Caveat, Impetus security.DischargeImpetus, _ ...rpc.CallOpt) (Discharge security.Discharge, _ error)
}

DischargerClientMethods is the client interface containing Discharger methods.

Discharger is the interface for obtaining discharges for ThirdPartyCaveats.

type DischargerClientStub

type DischargerClientStub interface {
	DischargerClientMethods
	rpc.UniversalServiceMethods
}

DischargerClientStub adds universal methods to DischargerClientMethods.

func DischargerClient

func DischargerClient(name string) DischargerClientStub

DischargerClient returns a client stub for Discharger.

type DischargerServerMethods

type DischargerServerMethods interface {
	// Discharge is called by a principal that holds a blessing with a third
	// party caveat and seeks to get a discharge that proves the fulfillment of
	// this caveat.
	Discharge(_ *context.T, _ rpc.ServerCall, Caveat security.Caveat, Impetus security.DischargeImpetus) (Discharge security.Discharge, _ error)
}

DischargerServerMethods is the interface a server writer implements for Discharger.

Discharger is the interface for obtaining discharges for ThirdPartyCaveats.

type DischargerServerStub

type DischargerServerStub interface {
	DischargerServerStubMethods
	// Describe the Discharger interfaces.
	Describe__() []rpc.InterfaceDesc
}

DischargerServerStub adds universal methods to DischargerServerStubMethods.

func DischargerServer

func DischargerServer(impl DischargerServerMethods) DischargerServerStub

DischargerServer returns a server stub for Discharger. It converts an implementation of DischargerServerMethods into an object that may be used by rpc.Server.

type DischargerServerStubMethods

type DischargerServerStubMethods DischargerServerMethods

DischargerServerStubMethods is the server interface containing Discharger methods, as expected by rpc.Server. There is no difference between this interface and DischargerServerMethods since there are no streaming methods.

Jump to

Keyboard shortcuts

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