istio: istio.io/istio/security/pkg/platform/mock Index | Files

package mock

import "istio.io/istio/security/pkg/platform/mock"

Index

Package Files

fakeclient.go

type FakeClient Uses

type FakeClient struct {
    DialOption         []grpc.DialOption
    DialOptionErr      string
    Identity           string
    IdentityErr        string
    AgentCredential    []byte
    AgentCredentialErr string
    ProperPlatform     bool
}

FakeClient is mocked platform metadata client.

func (FakeClient) GetAgentCredential Uses

func (f FakeClient) GetAgentCredential() ([]byte, error)

GetAgentCredential returns empty credential.

func (FakeClient) GetCredentialType Uses

func (f FakeClient) GetCredentialType() string

GetCredentialType returns "fake".

func (FakeClient) GetDialOptions Uses

func (f FakeClient) GetDialOptions() ([]grpc.DialOption, error)

GetDialOptions returns the DialOption field.

func (FakeClient) GetServiceIdentity Uses

func (f FakeClient) GetServiceIdentity() (string, error)

GetServiceIdentity returns IdentityErr, or the Identity if IdentityErr is nil.

func (FakeClient) IsProperPlatform Uses

func (f FakeClient) IsProperPlatform() bool

IsProperPlatform returns ProperPlatform.

Package mock imports 2 packages (graph). Updated 2018-02-12. Refresh now. Tools for package owners.