Documentation
¶
Index ¶
- type FakeBaseExtensionImpl
- func (b *FakeBaseExtensionImpl) EnsureSubscriptionsExist(ctx context.Context, pubsubClient *pubsub.Client, ...) error
- func (b *FakeBaseExtensionImpl) EnsureTopicsExist(ctx context.Context, pubsubClient *pubsub.Client, topicIDs []string) error
- func (b *FakeBaseExtensionImpl) ErrorMap(err error) map[string]string
- func (b *FakeBaseExtensionImpl) GetEnvVar(envName string) (string, error)
- func (b *FakeBaseExtensionImpl) GetLoggedInUser(ctx context.Context) (*dto.UserInfo, error)
- func (b *FakeBaseExtensionImpl) GetLoggedInUserUID(ctx context.Context) (string, error)
- func (b *FakeBaseExtensionImpl) GetPubSubTopic(m *pubsubtools.PubSubPayload) (string, error)
- func (b *FakeBaseExtensionImpl) GetRunningEnvironment() string
- func (b *FakeBaseExtensionImpl) GetUserProfileByPrimaryPhoneNumber(ctx context.Context, phone string, suspended bool) (*profileutils.UserProfile, error)
- func (b *FakeBaseExtensionImpl) GoogleCloudProjectIDEnvVarName() (string, error)
- func (b *FakeBaseExtensionImpl) LoadDepsFromYAML() (*interserviceclient.DepsConfig, error)
- func (b *FakeBaseExtensionImpl) NamespacePubsubIdentifier(serviceName string, topicID string, environment string, version string) string
- func (b *FakeBaseExtensionImpl) NormalizeMSISDN(msisdn string) (*string, error)
- func (b *FakeBaseExtensionImpl) PubSubHandlerPath() string
- func (b *FakeBaseExtensionImpl) PublishToPubsub(ctx context.Context, pubsubClient *pubsub.Client, topicID string, ...) error
- func (b *FakeBaseExtensionImpl) SetupISCclient(config interserviceclient.DepsConfig, serviceName string) (*interserviceclient.InterServiceClient, error)
- func (b *FakeBaseExtensionImpl) SubscriptionIDs(topicIDs []string) map[string]string
- func (b *FakeBaseExtensionImpl) VerifyPubSubJWTAndDecodePayload(w http.ResponseWriter, r *http.Request) (*pubsubtools.PubSubPayload, error)
- func (b *FakeBaseExtensionImpl) WriteJSONResponse(w http.ResponseWriter, source interface{}, status int)
- type ISCClientExtension
- type PINExtensionImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeBaseExtensionImpl ¶
type FakeBaseExtensionImpl struct { GetLoggedInUserFn func(ctx context.Context) (*dto.UserInfo, error) GetLoggedInUserUIDFn func(ctx context.Context) (string, error) NormalizeMSISDNFn func(msisdn string) (*string, error) LoadDepsFromYAMLFn func() (*interserviceclient.DepsConfig, error) SetupISCclientFn func(config interserviceclient.DepsConfig, serviceName string) (*interserviceclient.InterServiceClient, error) GetEnvVarFn func(envName string) (string, error) EnsureTopicsExistFn func( ctx context.Context, pubsubClient *pubsub.Client, topicIDs []string, ) error GetRunningEnvironmentFn func() string NamespacePubsubIdentifierFn func( serviceName string, topicID string, environment string, version string, ) string PublishToPubsubFn func( ctx context.Context, pubsubClient *pubsub.Client, topicID string, environment string, serviceName string, version string, payload []byte, ) error GoogleCloudProjectIDEnvVarNameFn func() (string, error) EnsureSubscriptionsExistFn func( ctx context.Context, pubsubClient *pubsub.Client, topicSubscriptionMap map[string]string, callbackURL string, ) error SubscriptionIDsFn func(topicIDs []string) map[string]string PubSubHandlerPathFn func() string VerifyPubSubJWTAndDecodePayloadFn func( w http.ResponseWriter, r *http.Request, ) (*pubsubtools.PubSubPayload, error) GetPubSubTopicFn func(m *pubsubtools.PubSubPayload) (string, error) ErrorMapFn func(err error) map[string]string WriteJSONResponseFn func( w http.ResponseWriter, source interface{}, status int, ) GetUserProfileByPrimaryPhoneNumberFn func(ctx context.Context, phone string, suspended bool) (*profileutils.UserProfile, error) }
FakeBaseExtensionImpl is a `base` library fake .
func (*FakeBaseExtensionImpl) EnsureSubscriptionsExist ¶
func (b *FakeBaseExtensionImpl) EnsureSubscriptionsExist( ctx context.Context, pubsubClient *pubsub.Client, topicSubscriptionMap map[string]string, callbackURL string, ) error
EnsureSubscriptionsExist ...
func (*FakeBaseExtensionImpl) EnsureTopicsExist ¶
func (b *FakeBaseExtensionImpl) EnsureTopicsExist( ctx context.Context, pubsubClient *pubsub.Client, topicIDs []string, ) error
EnsureTopicsExist ...
func (*FakeBaseExtensionImpl) ErrorMap ¶
func (b *FakeBaseExtensionImpl) ErrorMap(err error) map[string]string
ErrorMap ..
func (*FakeBaseExtensionImpl) GetEnvVar ¶
func (b *FakeBaseExtensionImpl) GetEnvVar(envName string) (string, error)
GetEnvVar ...
func (*FakeBaseExtensionImpl) GetLoggedInUser ¶
GetLoggedInUser retrieves logged in user information
func (*FakeBaseExtensionImpl) GetLoggedInUserUID ¶
func (b *FakeBaseExtensionImpl) GetLoggedInUserUID(ctx context.Context) (string, error)
GetLoggedInUserUID ...
func (*FakeBaseExtensionImpl) GetPubSubTopic ¶
func (b *FakeBaseExtensionImpl) GetPubSubTopic(m *pubsubtools.PubSubPayload) (string, error)
GetPubSubTopic ..
func (*FakeBaseExtensionImpl) GetRunningEnvironment ¶
func (b *FakeBaseExtensionImpl) GetRunningEnvironment() string
GetRunningEnvironment ..
func (*FakeBaseExtensionImpl) GetUserProfileByPrimaryPhoneNumber ¶
func (b *FakeBaseExtensionImpl) GetUserProfileByPrimaryPhoneNumber(ctx context.Context, phone string, suspended bool) (*profileutils.UserProfile, error)
GetUserProfileByPrimaryPhoneNumber ..
func (*FakeBaseExtensionImpl) GoogleCloudProjectIDEnvVarName ¶
func (b *FakeBaseExtensionImpl) GoogleCloudProjectIDEnvVarName() (string, error)
GoogleCloudProjectIDEnvVarName ..
func (*FakeBaseExtensionImpl) LoadDepsFromYAML ¶
func (b *FakeBaseExtensionImpl) LoadDepsFromYAML() (*interserviceclient.DepsConfig, error)
LoadDepsFromYAML ...
func (*FakeBaseExtensionImpl) NamespacePubsubIdentifier ¶
func (b *FakeBaseExtensionImpl) NamespacePubsubIdentifier( serviceName string, topicID string, environment string, version string, ) string
NamespacePubsubIdentifier ..
func (*FakeBaseExtensionImpl) NormalizeMSISDN ¶
func (b *FakeBaseExtensionImpl) NormalizeMSISDN(msisdn string) (*string, error)
NormalizeMSISDN ...
func (*FakeBaseExtensionImpl) PubSubHandlerPath ¶
func (b *FakeBaseExtensionImpl) PubSubHandlerPath() string
PubSubHandlerPath ..
func (*FakeBaseExtensionImpl) PublishToPubsub ¶
func (b *FakeBaseExtensionImpl) PublishToPubsub( ctx context.Context, pubsubClient *pubsub.Client, topicID string, environment string, serviceName string, version string, payload []byte, ) error
PublishToPubsub ..
func (*FakeBaseExtensionImpl) SetupISCclient ¶
func (b *FakeBaseExtensionImpl) SetupISCclient(config interserviceclient.DepsConfig, serviceName string) (*interserviceclient.InterServiceClient, error)
SetupISCclient ...
func (*FakeBaseExtensionImpl) SubscriptionIDs ¶
func (b *FakeBaseExtensionImpl) SubscriptionIDs(topicIDs []string) map[string]string
SubscriptionIDs ..
func (*FakeBaseExtensionImpl) VerifyPubSubJWTAndDecodePayload ¶
func (b *FakeBaseExtensionImpl) VerifyPubSubJWTAndDecodePayload( w http.ResponseWriter, r *http.Request, ) (*pubsubtools.PubSubPayload, error)
VerifyPubSubJWTAndDecodePayload ..
func (*FakeBaseExtensionImpl) WriteJSONResponse ¶
func (b *FakeBaseExtensionImpl) WriteJSONResponse( w http.ResponseWriter, source interface{}, status int, )
WriteJSONResponse ..
type ISCClientExtension ¶
type ISCClientExtension struct {
MakeRequestFn func(ctx context.Context, method string, path string, body interface{}) (*http.Response, error)
}
ISCClientExtension is an ISC fake
func (*ISCClientExtension) MakeRequest ¶
func (i *ISCClientExtension) MakeRequest(ctx context.Context, method string, path string, body interface{}) (*http.Response, error)
MakeRequest ...
type PINExtensionImpl ¶
type PINExtensionImpl struct { EncryptPINFn func(rawPwd string, options *extension.Options) (string, string) ComparePINFn func(rawPwd string, salt string, encodedPwd string, options *extension.Options) bool GenerateTempPINFn func(ctx context.Context) (string, error) }
PINExtensionImpl is a `PIN` fake .
func (*PINExtensionImpl) ComparePIN ¶
func (p *PINExtensionImpl) ComparePIN(rawPwd string, salt string, encodedPwd string, options *extension.Options) bool
ComparePIN ...
func (*PINExtensionImpl) EncryptPIN ¶
EncryptPIN ...
func (*PINExtensionImpl) GenerateTempPIN ¶
func (p *PINExtensionImpl) GenerateTempPIN(ctx context.Context) (string, error)
GenerateTempPIN ...