_go

package
v0.0.0-...-b2fe3bc Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package _go is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	StoreService_GetUser_FullMethodName             = "/store.manager.v1.StoreService/GetUser"
	StoreService_UpsertUser_FullMethodName          = "/store.manager.v1.StoreService/UpsertUser"
	StoreService_UpsertPrivacyPolicy_FullMethodName = "/store.manager.v1.StoreService/UpsertPrivacyPolicy"
	StoreService_GetSubscription_FullMethodName     = "/store.manager.v1.StoreService/GetSubscription"
	StoreService_AddMember_FullMethodName           = "/store.manager.v1.StoreService/AddMember"
	StoreService_RemoveMember_FullMethodName        = "/store.manager.v1.StoreService/RemoveMember"
)

Variables

View Source
var (
	SubscriptionType_name = map[int32]string{
		0: "SUBSCRIPTION_TYPE_UNSPECIFIED",
		1: "SUBSCRIPTION_TYPE_TRIAL",
		2: "SUBSCRIPTION_TYPE_PREMIUM",
		3: "SUBSCRIPTION_TYPE_MANUAL_PREMIUM",
		4: "SUBSCRIPTION_TYPE_FREE",
	}
	SubscriptionType_value = map[string]int32{
		"SUBSCRIPTION_TYPE_UNSPECIFIED":    0,
		"SUBSCRIPTION_TYPE_TRIAL":          1,
		"SUBSCRIPTION_TYPE_PREMIUM":        2,
		"SUBSCRIPTION_TYPE_MANUAL_PREMIUM": 3,
		"SUBSCRIPTION_TYPE_FREE":           4,
	}
)

Enum value maps for SubscriptionType.

View Source
var (
	SubscriptionCode_name = map[int32]string{
		0: "SUBSCRIPTION_CODE_UNSPECIFIED",
		1: "SUBSCRIPTION_CODE_STARTED",
		2: "SUBSCRIPTION_CODE_RENEWED",
		3: "SUBSCRIPTION_CODE_CANCELLED",
		4: "SUBSCRIPTION_CODE_EXPIRED",
	}
	SubscriptionCode_value = map[string]int32{
		"SUBSCRIPTION_CODE_UNSPECIFIED": 0,
		"SUBSCRIPTION_CODE_STARTED":     1,
		"SUBSCRIPTION_CODE_RENEWED":     2,
		"SUBSCRIPTION_CODE_CANCELLED":   3,
		"SUBSCRIPTION_CODE_EXPIRED":     4,
	}
)

Enum value maps for SubscriptionCode.

View Source
var (
	SubscriptionProvider_name = map[int32]string{
		0: "SUBSCRIPTION_PROVIDER_UNSPECIFIED",
		1: "SUBSCRIPTION_PROVIDER_APPLE",
		2: "SUBSCRIPTION_PROVIDER_GOOGLE",
		3: "SUBSCRIPTION_PROVIDER_STRIPE",
		4: "SUBSCRIPTION_PROVIDER_REDSYS",
	}
	SubscriptionProvider_value = map[string]int32{
		"SUBSCRIPTION_PROVIDER_UNSPECIFIED": 0,
		"SUBSCRIPTION_PROVIDER_APPLE":       1,
		"SUBSCRIPTION_PROVIDER_GOOGLE":      2,
		"SUBSCRIPTION_PROVIDER_STRIPE":      3,
		"SUBSCRIPTION_PROVIDER_REDSYS":      4,
	}
)

Enum value maps for SubscriptionProvider.

View Source
var File_api_proto_v1_store_manager_proto protoreflect.FileDescriptor
View Source
var StoreService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "store.manager.v1.StoreService",
	HandlerType: (*StoreServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUser",
			Handler:    _StoreService_GetUser_Handler,
		},
		{
			MethodName: "UpsertUser",
			Handler:    _StoreService_UpsertUser_Handler,
		},
		{
			MethodName: "UpsertPrivacyPolicy",
			Handler:    _StoreService_UpsertPrivacyPolicy_Handler,
		},
		{
			MethodName: "GetSubscription",
			Handler:    _StoreService_GetSubscription_Handler,
		},
		{
			MethodName: "AddMember",
			Handler:    _StoreService_AddMember_Handler,
		},
		{
			MethodName: "RemoveMember",
			Handler:    _StoreService_RemoveMember_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/proto/v1/store_manager.proto",
}

StoreService_ServiceDesc is the grpc.ServiceDesc for StoreService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterStoreServiceHandler

func RegisterStoreServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterStoreServiceHandler registers the http handlers for service StoreService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterStoreServiceHandlerClient

func RegisterStoreServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StoreServiceClient) error

RegisterStoreServiceHandlerClient registers the http handlers for service StoreService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "StoreServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "StoreServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "StoreServiceClient" to call the correct interceptors.

func RegisterStoreServiceHandlerFromEndpoint

func RegisterStoreServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterStoreServiceHandlerFromEndpoint is same as RegisterStoreServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterStoreServiceHandlerServer

func RegisterStoreServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StoreServiceServer) error

RegisterStoreServiceHandlerServer registers the http handlers for service StoreService to "mux". UnaryRPC :call StoreServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterStoreServiceHandlerFromEndpoint instead.

func RegisterStoreServiceServer

func RegisterStoreServiceServer(s grpc.ServiceRegistrar, srv StoreServiceServer)

Types

type AddMemberRequest

type AddMemberRequest struct {

	// user_id is the unique identifier of the user.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// app_id is the unique identifier of the application.
	AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	// recipient is the email of the member to add to the subscription.
	Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"`
	// contains filtered or unexported fields
}

AddMemberRequest

AddMemberRequest represents a request to add a member to a subscription.

func (*AddMemberRequest) Descriptor deprecated

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

Deprecated: Use AddMemberRequest.ProtoReflect.Descriptor instead.

func (*AddMemberRequest) GetAppId

func (x *AddMemberRequest) GetAppId() string

func (*AddMemberRequest) GetRecipient

func (x *AddMemberRequest) GetRecipient() string

func (*AddMemberRequest) GetUserId

func (x *AddMemberRequest) GetUserId() string

func (*AddMemberRequest) ProtoMessage

func (*AddMemberRequest) ProtoMessage()

func (*AddMemberRequest) ProtoReflect

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

func (*AddMemberRequest) Reset

func (x *AddMemberRequest) Reset()

func (*AddMemberRequest) String

func (x *AddMemberRequest) String() string

type AddMemberResponse

type AddMemberResponse struct {

	// success is the success of the operation.
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

AddMemberResponse

AddMemberResponse represents a response to add a member to a subscription.

func (*AddMemberResponse) Descriptor deprecated

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

Deprecated: Use AddMemberResponse.ProtoReflect.Descriptor instead.

func (*AddMemberResponse) GetSuccess

func (x *AddMemberResponse) GetSuccess() bool

func (*AddMemberResponse) ProtoMessage

func (*AddMemberResponse) ProtoMessage()

func (*AddMemberResponse) ProtoReflect

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

func (*AddMemberResponse) Reset

func (x *AddMemberResponse) Reset()

func (*AddMemberResponse) String

func (x *AddMemberResponse) String() string

type GetSubscriptionRequest

type GetSubscriptionRequest struct {

	// user_id is the unique identifier of the user.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// app_id is the unique identifier of the application.
	AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	// contains filtered or unexported fields
}

GetSubscriptionRequest

GetSubscriptionRequest represents a request to get a subscription.

func (*GetSubscriptionRequest) Descriptor deprecated

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

Deprecated: Use GetSubscriptionRequest.ProtoReflect.Descriptor instead.

func (*GetSubscriptionRequest) GetAppId

func (x *GetSubscriptionRequest) GetAppId() string

func (*GetSubscriptionRequest) GetUserId

func (x *GetSubscriptionRequest) GetUserId() string

func (*GetSubscriptionRequest) ProtoMessage

func (*GetSubscriptionRequest) ProtoMessage()

func (*GetSubscriptionRequest) ProtoReflect

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

func (*GetSubscriptionRequest) Reset

func (x *GetSubscriptionRequest) Reset()

func (*GetSubscriptionRequest) String

func (x *GetSubscriptionRequest) String() string

type GetSubscriptionResponse

type GetSubscriptionResponse struct {

	// subscription is the subscription.
	Subscription *Subscription `protobuf:"bytes,1,opt,name=subscription,proto3" json:"subscription,omitempty"`
	// contains filtered or unexported fields
}

GetSubscriptionResponse

GetSubscriptionResponse represents a response to get a subscription.

func (*GetSubscriptionResponse) Descriptor deprecated

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

Deprecated: Use GetSubscriptionResponse.ProtoReflect.Descriptor instead.

func (*GetSubscriptionResponse) GetSubscription

func (x *GetSubscriptionResponse) GetSubscription() *Subscription

func (*GetSubscriptionResponse) ProtoMessage

func (*GetSubscriptionResponse) ProtoMessage()

func (*GetSubscriptionResponse) ProtoReflect

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

func (*GetSubscriptionResponse) Reset

func (x *GetSubscriptionResponse) Reset()

func (*GetSubscriptionResponse) String

func (x *GetSubscriptionResponse) String() string

type GetUserRequest

type GetUserRequest struct {

	// user_id is the unique identifier of the user.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// app_id is the unique identifier of the application.
	AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	// contains filtered or unexported fields
}

GetUserRequest

GetUserRequest represents a request to get a user.

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetAppId

func (x *GetUserRequest) GetAppId() string

func (*GetUserRequest) GetUserId

func (x *GetUserRequest) GetUserId() string

func (*GetUserRequest) ProtoMessage

func (*GetUserRequest) ProtoMessage()

func (*GetUserRequest) ProtoReflect

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

func (*GetUserRequest) Reset

func (x *GetUserRequest) Reset()

func (*GetUserRequest) String

func (x *GetUserRequest) String() string

type GetUserResponse

type GetUserResponse struct {

	// user is the user.
	User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

GetUserResponse

GetUserResponse represents a response to get a user.

func (*GetUserResponse) Descriptor deprecated

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

Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.

func (*GetUserResponse) GetUser

func (x *GetUserResponse) GetUser() *User

func (*GetUserResponse) ProtoMessage

func (*GetUserResponse) ProtoMessage()

func (*GetUserResponse) ProtoReflect

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

func (*GetUserResponse) Reset

func (x *GetUserResponse) Reset()

func (*GetUserResponse) String

func (x *GetUserResponse) String() string

type PrivacyPolicy

type PrivacyPolicy struct {

	// version is the version of the privacy policy.
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// policy_date is the date when the privacy policy was created.
	PolicyDate *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=policy_date,json=policyDate,proto3" json:"policy_date,omitempty"`
	// accepted_date is the date when the privacy policy was accepted.
	AcceptedDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=accepted_date,json=acceptedDate,proto3" json:"accepted_date,omitempty"`
	// business_communications is the acceptance of business communications.
	BusinessCommunications bool `` /* 128-byte string literal not displayed */
	// marketing_segmentation is the acceptance of marketing segmentation.
	MarketingSegmentation bool `protobuf:"varint,5,opt,name=marketing_segmentation,json=marketingSegmentation,proto3" json:"marketing_segmentation,omitempty"`
	// data_transfer is the acceptance of data transfer.
	DataTransfer bool `protobuf:"varint,6,opt,name=data_transfer,json=dataTransfer,proto3" json:"data_transfer,omitempty"`
	// contains filtered or unexported fields
}

PrivacyPolicy

PrivacyPolicy represents a privacy policy accepted by the user.

func (*PrivacyPolicy) Descriptor deprecated

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

Deprecated: Use PrivacyPolicy.ProtoReflect.Descriptor instead.

func (*PrivacyPolicy) GetAcceptedDate

func (x *PrivacyPolicy) GetAcceptedDate() *timestamppb.Timestamp

func (*PrivacyPolicy) GetBusinessCommunications

func (x *PrivacyPolicy) GetBusinessCommunications() bool

func (*PrivacyPolicy) GetDataTransfer

func (x *PrivacyPolicy) GetDataTransfer() bool

func (*PrivacyPolicy) GetMarketingSegmentation

func (x *PrivacyPolicy) GetMarketingSegmentation() bool

func (*PrivacyPolicy) GetPolicyDate

func (x *PrivacyPolicy) GetPolicyDate() *timestamppb.Timestamp

func (*PrivacyPolicy) GetVersion

func (x *PrivacyPolicy) GetVersion() string

func (*PrivacyPolicy) ProtoMessage

func (*PrivacyPolicy) ProtoMessage()

func (*PrivacyPolicy) ProtoReflect

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

func (*PrivacyPolicy) Reset

func (x *PrivacyPolicy) Reset()

func (*PrivacyPolicy) String

func (x *PrivacyPolicy) String() string

type ProductPayload

type ProductPayload struct {

	// members is the number of members that the subscription has.
	Members *int32 `protobuf:"varint,1,opt,name=members,proto3,oneof" json:"members,omitempty"`
	// recipients is the list of emails of the recipients of the subscription.
	Recipients []string `protobuf:"bytes,3,rep,name=recipients,proto3" json:"recipients,omitempty"`
	// owner_id is the unique identifier of the owner of the subscription.
	OwnerId *string `protobuf:"bytes,4,opt,name=owner_id,json=ownerId,proto3,oneof" json:"owner_id,omitempty"`
	// gifted_id is the unique identifier of the user who gifted the subscription.
	GiftedId *string `protobuf:"bytes,5,opt,name=gifted_id,json=giftedId,proto3,oneof" json:"gifted_id,omitempty"`
	// contains filtered or unexported fields
}

ProductPayload

ProductPayload represents the payload of a product.

func (*ProductPayload) Descriptor deprecated

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

Deprecated: Use ProductPayload.ProtoReflect.Descriptor instead.

func (*ProductPayload) GetGiftedId

func (x *ProductPayload) GetGiftedId() string

func (*ProductPayload) GetMembers

func (x *ProductPayload) GetMembers() int32

func (*ProductPayload) GetOwnerId

func (x *ProductPayload) GetOwnerId() string

func (*ProductPayload) GetRecipients

func (x *ProductPayload) GetRecipients() []string

func (*ProductPayload) ProtoMessage

func (*ProductPayload) ProtoMessage()

func (*ProductPayload) ProtoReflect

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

func (*ProductPayload) Reset

func (x *ProductPayload) Reset()

func (*ProductPayload) String

func (x *ProductPayload) String() string

type RemoveMemberRequest

type RemoveMemberRequest struct {

	// user_id is the unique identifier of the user.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// app_id is the unique identifier of the application.
	AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	// recipient is the email of the member to remove from the subscription.
	Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"`
	// contains filtered or unexported fields
}

RemoveMemberRequest

RemoveMemberRequest represents a request to remove a member from a subscription.

func (*RemoveMemberRequest) Descriptor deprecated

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

Deprecated: Use RemoveMemberRequest.ProtoReflect.Descriptor instead.

func (*RemoveMemberRequest) GetAppId

func (x *RemoveMemberRequest) GetAppId() string

func (*RemoveMemberRequest) GetRecipient

func (x *RemoveMemberRequest) GetRecipient() string

func (*RemoveMemberRequest) GetUserId

func (x *RemoveMemberRequest) GetUserId() string

func (*RemoveMemberRequest) ProtoMessage

func (*RemoveMemberRequest) ProtoMessage()

func (*RemoveMemberRequest) ProtoReflect

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

func (*RemoveMemberRequest) Reset

func (x *RemoveMemberRequest) Reset()

func (*RemoveMemberRequest) String

func (x *RemoveMemberRequest) String() string

type RemoveMemberResponse

type RemoveMemberResponse struct {

	// success is the success of the operation.
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

RemoveMemberResponse

RemoveMemberResponse represents a response to remove a member from a subscription.

func (*RemoveMemberResponse) Descriptor deprecated

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

Deprecated: Use RemoveMemberResponse.ProtoReflect.Descriptor instead.

func (*RemoveMemberResponse) GetSuccess

func (x *RemoveMemberResponse) GetSuccess() bool

func (*RemoveMemberResponse) ProtoMessage

func (*RemoveMemberResponse) ProtoMessage()

func (*RemoveMemberResponse) ProtoReflect

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

func (*RemoveMemberResponse) Reset

func (x *RemoveMemberResponse) Reset()

func (*RemoveMemberResponse) String

func (x *RemoveMemberResponse) String() string

type StoreServiceClient

type StoreServiceClient interface {
	// GetUser
	//
	// GetUser returns the user with the given id.
	GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
	// UpsertUser
	//
	// UpsertUser creates or updates a user.
	UpsertUser(ctx context.Context, in *UpsertUserRequest, opts ...grpc.CallOption) (*UpsertUserResponse, error)
	// UpsertPrivacyPolicy
	//
	// UpsertPrivacyPolicy creates or updates the privacy policy of a user.
	UpsertPrivacyPolicy(ctx context.Context, in *UpsertPrivacyPolicyRequest, opts ...grpc.CallOption) (*UpsertPrivacyPolicyResponse, error)
	// GetSubscription
	//
	// GetSubscription returns the subscription with the given id.
	GetSubscription(ctx context.Context, in *GetSubscriptionRequest, opts ...grpc.CallOption) (*GetSubscriptionResponse, error)
	// AddMember
	//
	// AddMember adds a member to a subscription.
	AddMember(ctx context.Context, in *AddMemberRequest, opts ...grpc.CallOption) (*AddMemberResponse, error)
	// RemoveMember
	//
	// RemoveMember removes a member from a subscription.
	RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...grpc.CallOption) (*RemoveMemberResponse, error)
}

StoreServiceClient is the client API for StoreService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type StoreServiceServer

type StoreServiceServer interface {
	// GetUser
	//
	// GetUser returns the user with the given id.
	GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
	// UpsertUser
	//
	// UpsertUser creates or updates a user.
	UpsertUser(context.Context, *UpsertUserRequest) (*UpsertUserResponse, error)
	// UpsertPrivacyPolicy
	//
	// UpsertPrivacyPolicy creates or updates the privacy policy of a user.
	UpsertPrivacyPolicy(context.Context, *UpsertPrivacyPolicyRequest) (*UpsertPrivacyPolicyResponse, error)
	// GetSubscription
	//
	// GetSubscription returns the subscription with the given id.
	GetSubscription(context.Context, *GetSubscriptionRequest) (*GetSubscriptionResponse, error)
	// AddMember
	//
	// AddMember adds a member to a subscription.
	AddMember(context.Context, *AddMemberRequest) (*AddMemberResponse, error)
	// RemoveMember
	//
	// RemoveMember removes a member from a subscription.
	RemoveMember(context.Context, *RemoveMemberRequest) (*RemoveMemberResponse, error)
	// contains filtered or unexported methods
}

StoreServiceServer is the server API for StoreService service. All implementations must embed UnimplementedStoreServiceServer for forward compatibility

type Subscription

type Subscription struct {

	// user_id is the unique identifier of the user.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// app_id is the unique identifier of the application.
	AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	// type is the type of the subscription.
	Type SubscriptionType `protobuf:"varint,3,opt,name=type,proto3,enum=store.manager.v1.SubscriptionType" json:"type,omitempty"`
	// code is the code of the subscription.
	Code *SubscriptionCode `protobuf:"varint,4,opt,name=code,proto3,enum=store.manager.v1.SubscriptionCode,oneof" json:"code,omitempty"`
	// subscription_payload is the payload of the subscription.
	SubscriptionPayload *SubscriptionPayload `protobuf:"bytes,5,opt,name=subscription_payload,json=subscriptionPayload,proto3,oneof" json:"subscription_payload,omitempty"`
	// product_payload is the payload of the product.
	ProductPayload *ProductPayload `protobuf:"bytes,6,opt,name=product_payload,json=productPayload,proto3,oneof" json:"product_payload,omitempty"`
	// contains filtered or unexported fields
}

Subscription

Subscription represents a subscription that a user has purchased.

func (*Subscription) Descriptor deprecated

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

Deprecated: Use Subscription.ProtoReflect.Descriptor instead.

func (*Subscription) GetAppId

func (x *Subscription) GetAppId() string

func (*Subscription) GetCode

func (x *Subscription) GetCode() SubscriptionCode

func (*Subscription) GetProductPayload

func (x *Subscription) GetProductPayload() *ProductPayload

func (*Subscription) GetSubscriptionPayload

func (x *Subscription) GetSubscriptionPayload() *SubscriptionPayload

func (*Subscription) GetType

func (x *Subscription) GetType() SubscriptionType

func (*Subscription) GetUserId

func (x *Subscription) GetUserId() string

func (*Subscription) ProtoMessage

func (*Subscription) ProtoMessage()

func (*Subscription) ProtoReflect

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

func (*Subscription) Reset

func (x *Subscription) Reset()

func (*Subscription) String

func (x *Subscription) String() string

type SubscriptionCode

type SubscriptionCode int32

SubscriptionCode

SubscriptionCode represents the code of the subscription.

const (
	SubscriptionCode_SUBSCRIPTION_CODE_UNSPECIFIED SubscriptionCode = 0
	// SUBSCRIPTION_CODE_STARTED represents that a subscription has started.
	SubscriptionCode_SUBSCRIPTION_CODE_STARTED SubscriptionCode = 1
	// SUBSCRIPTION_CODE_RENEWED represents that a subscription has been renewed.
	SubscriptionCode_SUBSCRIPTION_CODE_RENEWED SubscriptionCode = 2
	// SUBSCRIPTION_CODE_CANCELLED represents that a subscription has been cancelled.
	SubscriptionCode_SUBSCRIPTION_CODE_CANCELLED SubscriptionCode = 3
	// SUBSCRIPTION_CODE_EXPIRED represents that a subscription has expired.
	SubscriptionCode_SUBSCRIPTION_CODE_EXPIRED SubscriptionCode = 4
)

func (SubscriptionCode) Descriptor

func (SubscriptionCode) Enum

func (SubscriptionCode) EnumDescriptor deprecated

func (SubscriptionCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use SubscriptionCode.Descriptor instead.

func (SubscriptionCode) Number

func (SubscriptionCode) String

func (x SubscriptionCode) String() string

func (SubscriptionCode) Type

type SubscriptionPayload

type SubscriptionPayload struct {

	// product_id is the unique identifier of the product.
	ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	// purchase_token is the purchase token of the subscription.
	PurchaseToken string `protobuf:"bytes,2,opt,name=purchase_token,json=purchaseToken,proto3" json:"purchase_token,omitempty"`
	// provider is the provider of the subscription.
	Provider SubscriptionProvider `protobuf:"varint,3,opt,name=provider,proto3,enum=store.manager.v1.SubscriptionProvider" json:"provider,omitempty"`
	// purchased_at is the time when the subscription was purchased.
	PurchasedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=purchased_at,json=purchasedAt,proto3" json:"purchased_at,omitempty"`
	// expires_at is the time when the subscription expires.
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	// contains filtered or unexported fields
}

SubscriptionPayload

SubscriptionPayload represents the payload of a subscription.

func (*SubscriptionPayload) Descriptor deprecated

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

Deprecated: Use SubscriptionPayload.ProtoReflect.Descriptor instead.

func (*SubscriptionPayload) GetExpiresAt

func (x *SubscriptionPayload) GetExpiresAt() *timestamppb.Timestamp

func (*SubscriptionPayload) GetProductId

func (x *SubscriptionPayload) GetProductId() string

func (*SubscriptionPayload) GetProvider

func (x *SubscriptionPayload) GetProvider() SubscriptionProvider

func (*SubscriptionPayload) GetPurchaseToken

func (x *SubscriptionPayload) GetPurchaseToken() string

func (*SubscriptionPayload) GetPurchasedAt

func (x *SubscriptionPayload) GetPurchasedAt() *timestamppb.Timestamp

func (*SubscriptionPayload) ProtoMessage

func (*SubscriptionPayload) ProtoMessage()

func (*SubscriptionPayload) ProtoReflect

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

func (*SubscriptionPayload) Reset

func (x *SubscriptionPayload) Reset()

func (*SubscriptionPayload) String

func (x *SubscriptionPayload) String() string

type SubscriptionProvider

type SubscriptionProvider int32

SubscriptionProvider

SubscriptionProvider represents the provider of the subscription.

const (
	SubscriptionProvider_SUBSCRIPTION_PROVIDER_UNSPECIFIED SubscriptionProvider = 0
	// SUBSCRIPTION_PROVIDER_APPLE represents a subscription purchased through Apple.
	SubscriptionProvider_SUBSCRIPTION_PROVIDER_APPLE SubscriptionProvider = 1
	// SUBSCRIPTION_PROVIDER_GOOGLE represents a subscription purchased through Google.
	SubscriptionProvider_SUBSCRIPTION_PROVIDER_GOOGLE SubscriptionProvider = 2
	// SUBSCRIPTION_PROVIDER_STRIPE represents a subscription purchased through Stripe.
	SubscriptionProvider_SUBSCRIPTION_PROVIDER_STRIPE SubscriptionProvider = 3
	// SUBSCRIPTION_PROVIDER_REDSYS represents a subscription purchased through Redsys.
	SubscriptionProvider_SUBSCRIPTION_PROVIDER_REDSYS SubscriptionProvider = 4
)

func (SubscriptionProvider) Descriptor

func (SubscriptionProvider) Enum

func (SubscriptionProvider) EnumDescriptor deprecated

func (SubscriptionProvider) EnumDescriptor() ([]byte, []int)

Deprecated: Use SubscriptionProvider.Descriptor instead.

func (SubscriptionProvider) Number

func (SubscriptionProvider) String

func (x SubscriptionProvider) String() string

func (SubscriptionProvider) Type

type SubscriptionType

type SubscriptionType int32

SubscriptionType

SubscriptionType represents the type of subscription that a user has purchased.

const (
	SubscriptionType_SUBSCRIPTION_TYPE_UNSPECIFIED SubscriptionType = 0
	// SUBSCRIPTION_TYPE_TRIAL represents a trial subscription.
	SubscriptionType_SUBSCRIPTION_TYPE_TRIAL SubscriptionType = 1
	// SUBSCRIPTION_TYPE_PREMIUM represents a premium subscription.
	SubscriptionType_SUBSCRIPTION_TYPE_PREMIUM SubscriptionType = 2
	// SUBSCRIPTION_TYPE_MANUAL_PREMIUM represents a manual premium subscription.
	SubscriptionType_SUBSCRIPTION_TYPE_MANUAL_PREMIUM SubscriptionType = 3
	// SUBSCRIPTION_TYPE_FREE represents a user with no subscription.
	SubscriptionType_SUBSCRIPTION_TYPE_FREE SubscriptionType = 4
)

func (SubscriptionType) Descriptor

func (SubscriptionType) Enum

func (SubscriptionType) EnumDescriptor deprecated

func (SubscriptionType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SubscriptionType.Descriptor instead.

func (SubscriptionType) Number

func (SubscriptionType) String

func (x SubscriptionType) String() string

func (SubscriptionType) Type

type UnimplementedStoreServiceServer

type UnimplementedStoreServiceServer struct {
}

UnimplementedStoreServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedStoreServiceServer) AddMember

func (UnimplementedStoreServiceServer) GetSubscription

func (UnimplementedStoreServiceServer) GetUser

func (UnimplementedStoreServiceServer) RemoveMember

func (UnimplementedStoreServiceServer) UpsertUser

type UnsafeStoreServiceServer

type UnsafeStoreServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeStoreServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StoreServiceServer will result in compilation errors.

type UpsertPrivacyPolicyRequest

type UpsertPrivacyPolicyRequest struct {

	// user_id is the unique identifier of the user.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// app_id is the unique identifier of the application.
	AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	// business_communications is the acceptance of business communications.
	BusinessCommunications bool `` /* 128-byte string literal not displayed */
	// marketing_segmentation is the acceptance of marketing segmentation.
	MarketingSegmentation bool `protobuf:"varint,4,opt,name=marketing_segmentation,json=marketingSegmentation,proto3" json:"marketing_segmentation,omitempty"`
	// data_transfer is the acceptance of data transfer.
	DataTransfer bool `protobuf:"varint,5,opt,name=data_transfer,json=dataTransfer,proto3" json:"data_transfer,omitempty"`
	// contains filtered or unexported fields
}

UpsertPrivacyPolicyRequest

UpsertPrivacyPolicyRequest represents a request to create or update the privacy policy of a user.

func (*UpsertPrivacyPolicyRequest) Descriptor deprecated

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

Deprecated: Use UpsertPrivacyPolicyRequest.ProtoReflect.Descriptor instead.

func (*UpsertPrivacyPolicyRequest) GetAppId

func (x *UpsertPrivacyPolicyRequest) GetAppId() string

func (*UpsertPrivacyPolicyRequest) GetBusinessCommunications

func (x *UpsertPrivacyPolicyRequest) GetBusinessCommunications() bool

func (*UpsertPrivacyPolicyRequest) GetDataTransfer

func (x *UpsertPrivacyPolicyRequest) GetDataTransfer() bool

func (*UpsertPrivacyPolicyRequest) GetMarketingSegmentation

func (x *UpsertPrivacyPolicyRequest) GetMarketingSegmentation() bool

func (*UpsertPrivacyPolicyRequest) GetUserId

func (x *UpsertPrivacyPolicyRequest) GetUserId() string

func (*UpsertPrivacyPolicyRequest) ProtoMessage

func (*UpsertPrivacyPolicyRequest) ProtoMessage()

func (*UpsertPrivacyPolicyRequest) ProtoReflect

func (*UpsertPrivacyPolicyRequest) Reset

func (x *UpsertPrivacyPolicyRequest) Reset()

func (*UpsertPrivacyPolicyRequest) String

func (x *UpsertPrivacyPolicyRequest) String() string

type UpsertPrivacyPolicyResponse

type UpsertPrivacyPolicyResponse struct {

	// success is the success of the operation.
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

UpsertPrivacyPolicyResponse

UpsertPrivacyPolicyResponse represents a response to create or update the privacy policy of a user.

func (*UpsertPrivacyPolicyResponse) Descriptor deprecated

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

Deprecated: Use UpsertPrivacyPolicyResponse.ProtoReflect.Descriptor instead.

func (*UpsertPrivacyPolicyResponse) GetSuccess

func (x *UpsertPrivacyPolicyResponse) GetSuccess() bool

func (*UpsertPrivacyPolicyResponse) ProtoMessage

func (*UpsertPrivacyPolicyResponse) ProtoMessage()

func (*UpsertPrivacyPolicyResponse) ProtoReflect

func (*UpsertPrivacyPolicyResponse) Reset

func (x *UpsertPrivacyPolicyResponse) Reset()

func (*UpsertPrivacyPolicyResponse) String

func (x *UpsertPrivacyPolicyResponse) String() string

type UpsertUserRequest

type UpsertUserRequest struct {

	// user_id is the unique identifier of the user.
	UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// app_id is the unique identifier of the application.
	AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	// email is the email of the user.
	Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// name is the name of the user.
	Name *string `protobuf:"bytes,4,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// image is the image URL of the user.
	Image *string `protobuf:"bytes,5,opt,name=image,proto3,oneof" json:"image,omitempty"`
	// contains filtered or unexported fields
}

UpsertUserRequest

UpsertUserRequest represents a request to create or update a user.

func (*UpsertUserRequest) Descriptor deprecated

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

Deprecated: Use UpsertUserRequest.ProtoReflect.Descriptor instead.

func (*UpsertUserRequest) GetAppId

func (x *UpsertUserRequest) GetAppId() string

func (*UpsertUserRequest) GetEmail

func (x *UpsertUserRequest) GetEmail() string

func (*UpsertUserRequest) GetImage

func (x *UpsertUserRequest) GetImage() string

func (*UpsertUserRequest) GetName

func (x *UpsertUserRequest) GetName() string

func (*UpsertUserRequest) GetUserId

func (x *UpsertUserRequest) GetUserId() string

func (*UpsertUserRequest) ProtoMessage

func (*UpsertUserRequest) ProtoMessage()

func (*UpsertUserRequest) ProtoReflect

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

func (*UpsertUserRequest) Reset

func (x *UpsertUserRequest) Reset()

func (*UpsertUserRequest) String

func (x *UpsertUserRequest) String() string

type UpsertUserResponse

type UpsertUserResponse struct {

	// success is the success of the operation.
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

UpsertUserResponse

UpsertUserResponse represents a response to create or update a user.

func (*UpsertUserResponse) Descriptor deprecated

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

Deprecated: Use UpsertUserResponse.ProtoReflect.Descriptor instead.

func (*UpsertUserResponse) GetSuccess

func (x *UpsertUserResponse) GetSuccess() bool

func (*UpsertUserResponse) ProtoMessage

func (*UpsertUserResponse) ProtoMessage()

func (*UpsertUserResponse) ProtoReflect

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

func (*UpsertUserResponse) Reset

func (x *UpsertUserResponse) Reset()

func (*UpsertUserResponse) String

func (x *UpsertUserResponse) String() string

type User

type User struct {

	// id is the unique identifier of the user.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// email is the email of the user.
	Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	// name is the name of the user.
	Name *string `protobuf:"bytes,3,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// image is the image URL of the user.
	Image *string `protobuf:"bytes,4,opt,name=image,proto3,oneof" json:"image,omitempty"`
	// privacy_policies is the list of privacy policies accepted by the user.
	PrivacyPolicies []*PrivacyPolicy `protobuf:"bytes,5,rep,name=privacy_policies,json=privacyPolicies,proto3" json:"privacy_policies,omitempty"`
	// contains filtered or unexported fields
}

User

User represents a user of the application.

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetImage

func (x *User) GetImage() string

func (*User) GetName

func (x *User) GetName() string

func (*User) GetPrivacyPolicies

func (x *User) GetPrivacyPolicies() []*PrivacyPolicy

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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