Documentation ¶
Overview ¶
Package test is a generated protocol buffer package.
It is generated from these files:
model/test/mock_config.proto
It has these top-level messages:
MockConfig ConfigPair
Index ¶
Constants ¶
View Source
const ( // JwtPubKey1 is the response to 1st call for JWT public key returned by mock server. JwtPubKey1 = "fakeKey1" // JwtPubKey2 is the response to later calls for JWT public key returned by mock server. JwtPubKey2 = "fakeKey2" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigPair ¶
type ConfigPair struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` }
func (*ConfigPair) Descriptor ¶
func (*ConfigPair) Descriptor() ([]byte, []int)
func (*ConfigPair) GetKey ¶
func (m *ConfigPair) GetKey() string
func (*ConfigPair) GetValue ¶
func (m *ConfigPair) GetValue() string
func (*ConfigPair) ProtoMessage ¶
func (*ConfigPair) ProtoMessage()
func (*ConfigPair) Reset ¶
func (m *ConfigPair) Reset()
func (*ConfigPair) String ¶
func (m *ConfigPair) String() string
type MockConfig ¶
type MockConfig struct { Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` Pairs []*ConfigPair `protobuf:"bytes,2,rep,name=pairs" json:"pairs,omitempty"` }
func (*MockConfig) Descriptor ¶
func (*MockConfig) Descriptor() ([]byte, []int)
func (*MockConfig) GetKey ¶
func (m *MockConfig) GetKey() string
func (*MockConfig) GetPairs ¶
func (m *MockConfig) GetPairs() []*ConfigPair
func (*MockConfig) ProtoMessage ¶
func (*MockConfig) ProtoMessage()
func (*MockConfig) Reset ¶
func (m *MockConfig) Reset()
func (*MockConfig) String ¶
func (m *MockConfig) String() string
type MockOpenIDDiscoveryServer ¶
type MockOpenIDDiscoveryServer struct { Port int URL string // How many times openIDCfg is called, use this number to verfiy cache takes effect. OpenIDHitNum uint64 // How many times jwtPubKey is called, use this number to verfiy cache takes effect. PubKeyHitNum uint64 // contains filtered or unexported fields }
MockOpenIDDiscoveryServer is the in-memory openID discovery server.
func NewServer ¶
func NewServer() (*MockOpenIDDiscoveryServer, error)
NewServer creates a mock openID discovery server.
func (*MockOpenIDDiscoveryServer) Start ¶
func (ms *MockOpenIDDiscoveryServer) Start() error
Start starts the mock server.
func (*MockOpenIDDiscoveryServer) Stop ¶
func (ms *MockOpenIDDiscoveryServer) Stop() error
Stop stops he mock server.
Click to show internal directories.
Click to hide internal directories.