onboarding

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_signup_proto protoreflect.FileDescriptor

Functions

func NewSignupEndpoints

func NewSignupEndpoints() []*api.Endpoint

func RegisterSignupHandler

func RegisterSignupHandler(s server.Server, hdlr SignupHandler, opts ...server.HandlerOption) error

Types

type AuthToken

type AuthToken struct {
	AccessToken  string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"`
	Created      int64  `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
	Expiry       int64  `protobuf:"varint,4,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

lifted from https://github.com/micro/go-micro/blob/master/auth/service/proto/auth.proto

func (*AuthToken) Descriptor deprecated

func (*AuthToken) Descriptor() ([]byte, []int)

Deprecated: Use AuthToken.ProtoReflect.Descriptor instead.

func (*AuthToken) GetAccessToken

func (x *AuthToken) GetAccessToken() string

func (*AuthToken) GetCreated

func (x *AuthToken) GetCreated() int64

func (*AuthToken) GetExpiry

func (x *AuthToken) GetExpiry() int64

func (*AuthToken) GetRefreshToken

func (x *AuthToken) GetRefreshToken() string

func (*AuthToken) ProtoMessage

func (*AuthToken) ProtoMessage()

func (*AuthToken) ProtoReflect

func (x *AuthToken) ProtoReflect() protoreflect.Message

func (*AuthToken) Reset

func (x *AuthToken) Reset()

func (*AuthToken) String

func (x *AuthToken) String() string

type RecoverRequest

type RecoverRequest struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*RecoverRequest) Descriptor deprecated

func (*RecoverRequest) Descriptor() ([]byte, []int)

Deprecated: Use RecoverRequest.ProtoReflect.Descriptor instead.

func (*RecoverRequest) GetEmail

func (x *RecoverRequest) GetEmail() string

func (*RecoverRequest) ProtoMessage

func (*RecoverRequest) ProtoMessage()

func (*RecoverRequest) ProtoReflect

func (x *RecoverRequest) ProtoReflect() protoreflect.Message

func (*RecoverRequest) Reset

func (x *RecoverRequest) Reset()

func (*RecoverRequest) String

func (x *RecoverRequest) String() string

type RecoverResponse

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

func (*RecoverResponse) Descriptor deprecated

func (*RecoverResponse) Descriptor() ([]byte, []int)

Deprecated: Use RecoverResponse.ProtoReflect.Descriptor instead.

func (*RecoverResponse) ProtoMessage

func (*RecoverResponse) ProtoMessage()

func (*RecoverResponse) ProtoReflect

func (x *RecoverResponse) ProtoReflect() protoreflect.Message

func (*RecoverResponse) Reset

func (x *RecoverResponse) Reset()

func (*RecoverResponse) String

func (x *RecoverResponse) String() string

type ResetPasswordRequest

type ResetPasswordRequest struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// token that was emailed or sent over SMS etc
	// in case of a forgotten password
	Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	// new secret/password for the account
	Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*ResetPasswordRequest) Descriptor deprecated

func (*ResetPasswordRequest) Descriptor() ([]byte, []int)

Deprecated: Use ResetPasswordRequest.ProtoReflect.Descriptor instead.

func (*ResetPasswordRequest) GetEmail

func (x *ResetPasswordRequest) GetEmail() string

func (*ResetPasswordRequest) GetPassword

func (x *ResetPasswordRequest) GetPassword() string

func (*ResetPasswordRequest) GetToken

func (x *ResetPasswordRequest) GetToken() string

func (*ResetPasswordRequest) ProtoMessage

func (*ResetPasswordRequest) ProtoMessage()

func (*ResetPasswordRequest) ProtoReflect

func (x *ResetPasswordRequest) ProtoReflect() protoreflect.Message

func (*ResetPasswordRequest) Reset

func (x *ResetPasswordRequest) Reset()

func (*ResetPasswordRequest) String

func (x *ResetPasswordRequest) String() string

type ResetPasswordResponse

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

func (*ResetPasswordResponse) Descriptor deprecated

func (*ResetPasswordResponse) Descriptor() ([]byte, []int)

Deprecated: Use ResetPasswordResponse.ProtoReflect.Descriptor instead.

func (*ResetPasswordResponse) ProtoMessage

func (*ResetPasswordResponse) ProtoMessage()

func (*ResetPasswordResponse) ProtoReflect

func (x *ResetPasswordResponse) ProtoReflect() protoreflect.Message

func (*ResetPasswordResponse) Reset

func (x *ResetPasswordResponse) Reset()

func (*ResetPasswordResponse) String

func (x *ResetPasswordResponse) String() string

type SignupHandler

type SignupHandler interface {
	// Sends the verification email to the user
	User(context.Context, *UserRequest, *UserResponse) error
	// Verifies and completes signup process
	Verify(context.Context, *VerifyRequest, *VerifyResponse) error
	Recover(context.Context, *RecoverRequest, *RecoverResponse) error
	ResetPassword(context.Context, *ResetPasswordRequest, *ResetPasswordResponse) error
	Track(context.Context, *TrackRequest, *TrackResponse) error
}

type SignupService

type SignupService interface {
	// Sends the verification email to the user
	User(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserResponse, error)
	// Verifies and completes signup process
	Verify(ctx context.Context, in *VerifyRequest, opts ...client.CallOption) (*VerifyResponse, error)
	Recover(ctx context.Context, in *RecoverRequest, opts ...client.CallOption) (*RecoverResponse, error)
	ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...client.CallOption) (*ResetPasswordResponse, error)
	Track(ctx context.Context, in *TrackRequest, opts ...client.CallOption) (*TrackResponse, error)
}

func NewSignupService

func NewSignupService(name string, c client.Client) SignupService

type TrackRequest

type TrackRequest struct {

	// tracking id, generated on the frontend
	Id                string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Email             string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	FirstVisit        int64  `protobuf:"varint,3,opt,name=firstVisit,proto3" json:"firstVisit,omitempty"`
	FirstVerification int64  `protobuf:"varint,4,opt,name=firstVerification,proto3" json:"firstVerification,omitempty"`
	Registration      int64  `protobuf:"varint,5,opt,name=registration,proto3" json:"registration,omitempty"`
	Referrer          string `protobuf:"bytes,6,opt,name=referrer,proto3" json:"referrer,omitempty"`
	// contains filtered or unexported fields
}

func (*TrackRequest) Descriptor deprecated

func (*TrackRequest) Descriptor() ([]byte, []int)

Deprecated: Use TrackRequest.ProtoReflect.Descriptor instead.

func (*TrackRequest) GetEmail

func (x *TrackRequest) GetEmail() string

func (*TrackRequest) GetFirstVerification

func (x *TrackRequest) GetFirstVerification() int64

func (*TrackRequest) GetFirstVisit

func (x *TrackRequest) GetFirstVisit() int64

func (*TrackRequest) GetId

func (x *TrackRequest) GetId() string

func (*TrackRequest) GetReferrer

func (x *TrackRequest) GetReferrer() string

func (*TrackRequest) GetRegistration

func (x *TrackRequest) GetRegistration() int64

func (*TrackRequest) ProtoMessage

func (*TrackRequest) ProtoMessage()

func (*TrackRequest) ProtoReflect

func (x *TrackRequest) ProtoReflect() protoreflect.Message

func (*TrackRequest) Reset

func (x *TrackRequest) Reset()

func (*TrackRequest) String

func (x *TrackRequest) String() string

type TrackResponse

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

func (*TrackResponse) Descriptor deprecated

func (*TrackResponse) Descriptor() ([]byte, []int)

Deprecated: Use TrackResponse.ProtoReflect.Descriptor instead.

func (*TrackResponse) ProtoMessage

func (*TrackResponse) ProtoMessage()

func (*TrackResponse) ProtoReflect

func (x *TrackResponse) ProtoReflect() protoreflect.Message

func (*TrackResponse) Reset

func (x *TrackResponse) Reset()

func (*TrackResponse) String

func (x *TrackResponse) String() string

type UserRequest

type UserRequest struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*UserRequest) Descriptor deprecated

func (*UserRequest) Descriptor() ([]byte, []int)

Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.

func (*UserRequest) GetEmail

func (x *UserRequest) GetEmail() string

func (*UserRequest) ProtoMessage

func (*UserRequest) ProtoMessage()

func (*UserRequest) ProtoReflect

func (x *UserRequest) ProtoReflect() protoreflect.Message

func (*UserRequest) Reset

func (x *UserRequest) Reset()

func (*UserRequest) String

func (x *UserRequest) String() string

type UserResponse

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

func (*UserResponse) Descriptor deprecated

func (*UserResponse) Descriptor() ([]byte, []int)

Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.

func (*UserResponse) ProtoMessage

func (*UserResponse) ProtoMessage()

func (*UserResponse) ProtoReflect

func (x *UserResponse) ProtoReflect() protoreflect.Message

func (*UserResponse) Reset

func (x *UserResponse) Reset()

func (*UserResponse) String

func (x *UserResponse) String() string

type VerifyRequest

type VerifyRequest struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// The token that was received in the email
	Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// The secret/password to use for the account
	Secret string `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"`
	// contains filtered or unexported fields
}

func (*VerifyRequest) Descriptor deprecated

func (*VerifyRequest) Descriptor() ([]byte, []int)

Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.

func (*VerifyRequest) GetEmail

func (x *VerifyRequest) GetEmail() string

func (*VerifyRequest) GetSecret

func (x *VerifyRequest) GetSecret() string

func (*VerifyRequest) GetToken

func (x *VerifyRequest) GetToken() string

func (*VerifyRequest) ProtoMessage

func (*VerifyRequest) ProtoMessage()

func (*VerifyRequest) ProtoReflect

func (x *VerifyRequest) ProtoReflect() protoreflect.Message

func (*VerifyRequest) Reset

func (x *VerifyRequest) Reset()

func (*VerifyRequest) String

func (x *VerifyRequest) String() string

type VerifyResponse

type VerifyResponse struct {
	AuthToken  *AuthToken `protobuf:"bytes,1,opt,name=authToken,proto3" json:"authToken,omitempty"`
	CustomerID string     `protobuf:"bytes,2,opt,name=customerID,proto3" json:"customerID,omitempty"`
	Namespace  string     `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"`
	// contains filtered or unexported fields
}

func (*VerifyResponse) Descriptor deprecated

func (*VerifyResponse) Descriptor() ([]byte, []int)

Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.

func (*VerifyResponse) GetAuthToken

func (x *VerifyResponse) GetAuthToken() *AuthToken

func (*VerifyResponse) GetCustomerID

func (x *VerifyResponse) GetCustomerID() string

func (*VerifyResponse) GetNamespace

func (x *VerifyResponse) GetNamespace() string

func (*VerifyResponse) ProtoMessage

func (*VerifyResponse) ProtoMessage()

func (*VerifyResponse) ProtoReflect

func (x *VerifyResponse) ProtoReflect() protoreflect.Message

func (*VerifyResponse) Reset

func (x *VerifyResponse) Reset()

func (*VerifyResponse) String

func (x *VerifyResponse) String() string

Jump to

Keyboard shortcuts

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