v0

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsentService_GetConsentsForSubscription_FullMethodName   = "/wgtwo.consents.v0.ConsentService/GetConsentsForSubscription"
	ConsentService_CreateConsentForSubscription_FullMethodName = "/wgtwo.consents.v0.ConsentService/CreateConsentForSubscription"
	ConsentService_RevokeConsentForSubscription_FullMethodName = "/wgtwo.consents.v0.ConsentService/RevokeConsentForSubscription"
)

Variables

View Source
var ConsentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "wgtwo.consents.v0.ConsentService",
	HandlerType: (*ConsentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetConsentsForSubscription",
			Handler:    _ConsentService_GetConsentsForSubscription_Handler,
		},
		{
			MethodName: "CreateConsentForSubscription",
			Handler:    _ConsentService_CreateConsentForSubscription_Handler,
		},
		{
			MethodName: "RevokeConsentForSubscription",
			Handler:    _ConsentService_RevokeConsentForSubscription_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "wgtwo/consents/v0/consents.proto",
}

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

View Source
var File_wgtwo_consents_v0_consents_proto protoreflect.FileDescriptor

Functions

func RegisterConsentServiceServer

func RegisterConsentServiceServer(s grpc.ServiceRegistrar, srv ConsentServiceServer)

Types

type Consent struct {

	// The owner of the consent.
	Owner *ConsentOwner `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// The product identifier.
	ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	// The scopes of the consent.
	Scopes []*Scope `protobuf:"bytes,3,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// Whether the consent is revocable.
	Revokable bool              `protobuf:"varint,4,opt,name=revokable,proto3" json:"revokable,omitempty"`
	Metadata  map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

A consent for a subscription.

func (*Consent) Descriptor deprecated

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

Deprecated: Use Consent.ProtoReflect.Descriptor instead.

func (*Consent) GetMetadata added in v0.1.7

func (x *Consent) GetMetadata() map[string]string

func (*Consent) GetOwner

func (x *Consent) GetOwner() *ConsentOwner

func (*Consent) GetProductId

func (x *Consent) GetProductId() string

func (*Consent) GetRevokable

func (x *Consent) GetRevokable() bool

func (*Consent) GetScopes

func (x *Consent) GetScopes() []*Scope

func (*Consent) ProtoMessage

func (*Consent) ProtoMessage()

func (*Consent) ProtoReflect

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

func (*Consent) Reset

func (x *Consent) Reset()

func (*Consent) String

func (x *Consent) String() string

type ConsentOwner

type ConsentOwner struct {

	// The type of the owner.
	//
	// Types that are assignable to Value:
	//
	//	*ConsentOwner_Subscription
	//	*ConsentOwner_Tenant
	Value isConsentOwner_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

The owner of a consent.

func (*ConsentOwner) Descriptor deprecated

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

Deprecated: Use ConsentOwner.ProtoReflect.Descriptor instead.

func (*ConsentOwner) GetSubscription

func (x *ConsentOwner) GetSubscription() *Subscription

func (*ConsentOwner) GetTenant

func (x *ConsentOwner) GetTenant() *v0.Tenant

func (*ConsentOwner) GetValue

func (m *ConsentOwner) GetValue() isConsentOwner_Value

func (*ConsentOwner) ProtoMessage

func (*ConsentOwner) ProtoMessage()

func (*ConsentOwner) ProtoReflect

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

func (*ConsentOwner) Reset

func (x *ConsentOwner) Reset()

func (*ConsentOwner) String

func (x *ConsentOwner) String() string

type ConsentOwner_Subscription

type ConsentOwner_Subscription struct {
	// The subscription owns the consent.
	Subscription *Subscription `protobuf:"bytes,1,opt,name=subscription,proto3,oneof"`
}

type ConsentOwner_Tenant

type ConsentOwner_Tenant struct {
	// The tenant (operator) owns the consent, on behalf of the subscription.
	Tenant *v0.Tenant `protobuf:"bytes,2,opt,name=tenant,proto3,oneof"`
}

type ConsentServiceClient

type ConsentServiceClient interface {
	// Returns the consents for a subscription.
	GetConsentsForSubscription(ctx context.Context, in *GetConsentsForSubscriptionRequest, opts ...grpc.CallOption) (*GetConsentsForSubscriptionResponse, error)
	// Create a consent for a subscription.
	CreateConsentForSubscription(ctx context.Context, in *CreateConsentForSubscriptionRequest, opts ...grpc.CallOption) (*CreateConsentForSubscriptionResponse, error)
	// Revoke a consent for a subscription.
	RevokeConsentForSubscription(ctx context.Context, in *RevokeConsentForSubscriptionRequest, opts ...grpc.CallOption) (*RevokeConsentForSubscriptionResponse, error)
}

ConsentServiceClient is the client API for ConsentService 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.

ConsentService is a service for managing consents for a subscription.

type ConsentServiceServer

type ConsentServiceServer interface {
	// Returns the consents for a subscription.
	GetConsentsForSubscription(context.Context, *GetConsentsForSubscriptionRequest) (*GetConsentsForSubscriptionResponse, error)
	// Create a consent for a subscription.
	CreateConsentForSubscription(context.Context, *CreateConsentForSubscriptionRequest) (*CreateConsentForSubscriptionResponse, error)
	// Revoke a consent for a subscription.
	RevokeConsentForSubscription(context.Context, *RevokeConsentForSubscriptionRequest) (*RevokeConsentForSubscriptionResponse, error)
}

ConsentServiceServer is the server API for ConsentService service. All implementations should embed UnimplementedConsentServiceServer for forward compatibility.

ConsentService is a service for managing consents for a subscription.

type CreateConsentForSubscriptionRequest added in v0.1.5

type CreateConsentForSubscriptionRequest struct {

	// The subscription identifier.
	Id *v0.SubscriptionIdentifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The phone number of the subscriber.
	// Planned for removal. Please use `id` above.
	PhoneNumber *v0.PhoneNumber `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// The product identifier.
	ProductId string            `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	Metadata  map[string]string `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request to create a consent for a subscription.

func (*CreateConsentForSubscriptionRequest) Descriptor deprecated added in v0.1.5

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

Deprecated: Use CreateConsentForSubscriptionRequest.ProtoReflect.Descriptor instead.

func (*CreateConsentForSubscriptionRequest) GetId added in v0.1.5

func (*CreateConsentForSubscriptionRequest) GetMetadata added in v0.1.7

func (x *CreateConsentForSubscriptionRequest) GetMetadata() map[string]string

func (*CreateConsentForSubscriptionRequest) GetPhoneNumber added in v0.1.5

func (x *CreateConsentForSubscriptionRequest) GetPhoneNumber() *v0.PhoneNumber

func (*CreateConsentForSubscriptionRequest) GetProductId added in v0.1.5

func (x *CreateConsentForSubscriptionRequest) GetProductId() string

func (*CreateConsentForSubscriptionRequest) ProtoMessage added in v0.1.5

func (*CreateConsentForSubscriptionRequest) ProtoMessage()

func (*CreateConsentForSubscriptionRequest) ProtoReflect added in v0.1.5

func (*CreateConsentForSubscriptionRequest) Reset added in v0.1.5

func (*CreateConsentForSubscriptionRequest) String added in v0.1.5

type CreateConsentForSubscriptionResponse added in v0.1.5

type CreateConsentForSubscriptionResponse struct {

	// The status code of the response.
	StatusCode v0.StatusCode `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3,enum=wgtwo.common.v0.StatusCode" json:"status_code,omitempty"`
	// The error message of the response. Empty for successes.
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

Create a consent for a subscription response.

func (*CreateConsentForSubscriptionResponse) Descriptor deprecated added in v0.1.5

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

Deprecated: Use CreateConsentForSubscriptionResponse.ProtoReflect.Descriptor instead.

func (*CreateConsentForSubscriptionResponse) GetErrorMessage added in v0.1.5

func (x *CreateConsentForSubscriptionResponse) GetErrorMessage() string

func (*CreateConsentForSubscriptionResponse) GetStatusCode added in v0.1.5

func (*CreateConsentForSubscriptionResponse) ProtoMessage added in v0.1.5

func (*CreateConsentForSubscriptionResponse) ProtoMessage()

func (*CreateConsentForSubscriptionResponse) ProtoReflect added in v0.1.5

func (*CreateConsentForSubscriptionResponse) Reset added in v0.1.5

func (*CreateConsentForSubscriptionResponse) String added in v0.1.5

type GetConsentsForSubscriptionRequest added in v0.1.5

type GetConsentsForSubscriptionRequest struct {

	// The subscription identifier.
	Id *v0.SubscriptionIdentifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The phone number of the subscriber.
	// Planned for removal. Please use `id` above.
	PhoneNumber *v0.PhoneNumber `protobuf:"bytes,2,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// contains filtered or unexported fields
}

Request to get consents for a subscription.

func (*GetConsentsForSubscriptionRequest) Descriptor deprecated added in v0.1.5

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

Deprecated: Use GetConsentsForSubscriptionRequest.ProtoReflect.Descriptor instead.

func (*GetConsentsForSubscriptionRequest) GetId added in v0.1.5

func (*GetConsentsForSubscriptionRequest) GetPhoneNumber added in v0.1.5

func (x *GetConsentsForSubscriptionRequest) GetPhoneNumber() *v0.PhoneNumber

func (*GetConsentsForSubscriptionRequest) ProtoMessage added in v0.1.5

func (*GetConsentsForSubscriptionRequest) ProtoMessage()

func (*GetConsentsForSubscriptionRequest) ProtoReflect added in v0.1.5

func (*GetConsentsForSubscriptionRequest) Reset added in v0.1.5

func (*GetConsentsForSubscriptionRequest) String added in v0.1.5

type GetConsentsForSubscriptionResponse added in v0.1.5

type GetConsentsForSubscriptionResponse struct {

	// The consents for the subscription.
	Consents []*Consent `protobuf:"bytes,1,rep,name=consents,proto3" json:"consents,omitempty"`
	// The status code of the response.
	StatusCode v0.StatusCode `protobuf:"varint,2,opt,name=status_code,json=statusCode,proto3,enum=wgtwo.common.v0.StatusCode" json:"status_code,omitempty"`
	// The error message of the response. Empty for successes.
	ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

Response to get consents for a subscription.

func (*GetConsentsForSubscriptionResponse) Descriptor deprecated added in v0.1.5

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

Deprecated: Use GetConsentsForSubscriptionResponse.ProtoReflect.Descriptor instead.

func (*GetConsentsForSubscriptionResponse) GetConsents added in v0.1.5

func (x *GetConsentsForSubscriptionResponse) GetConsents() []*Consent

func (*GetConsentsForSubscriptionResponse) GetErrorMessage added in v0.1.5

func (x *GetConsentsForSubscriptionResponse) GetErrorMessage() string

func (*GetConsentsForSubscriptionResponse) GetStatusCode added in v0.1.5

func (*GetConsentsForSubscriptionResponse) ProtoMessage added in v0.1.5

func (*GetConsentsForSubscriptionResponse) ProtoMessage()

func (*GetConsentsForSubscriptionResponse) ProtoReflect added in v0.1.5

func (*GetConsentsForSubscriptionResponse) Reset added in v0.1.5

func (*GetConsentsForSubscriptionResponse) String added in v0.1.5

type RevokeConsentForSubscriptionRequest added in v0.1.5

type RevokeConsentForSubscriptionRequest struct {

	// The subscription identifier.
	Id *v0.SubscriptionIdentifier `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The phone number of the subscriber.
	// Planned for removal. Please use `id` above.
	PhoneNumber *v0.PhoneNumber `protobuf:"bytes,3,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	// The product identifier.
	ProductId string `protobuf:"bytes,2,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	// contains filtered or unexported fields
}

Request to revoke a consent for a subscription.

func (*RevokeConsentForSubscriptionRequest) Descriptor deprecated added in v0.1.5

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

Deprecated: Use RevokeConsentForSubscriptionRequest.ProtoReflect.Descriptor instead.

func (*RevokeConsentForSubscriptionRequest) GetId added in v0.1.5

func (*RevokeConsentForSubscriptionRequest) GetPhoneNumber added in v0.1.5

func (x *RevokeConsentForSubscriptionRequest) GetPhoneNumber() *v0.PhoneNumber

func (*RevokeConsentForSubscriptionRequest) GetProductId added in v0.1.5

func (x *RevokeConsentForSubscriptionRequest) GetProductId() string

func (*RevokeConsentForSubscriptionRequest) ProtoMessage added in v0.1.5

func (*RevokeConsentForSubscriptionRequest) ProtoMessage()

func (*RevokeConsentForSubscriptionRequest) ProtoReflect added in v0.1.5

func (*RevokeConsentForSubscriptionRequest) Reset added in v0.1.5

func (*RevokeConsentForSubscriptionRequest) String added in v0.1.5

type RevokeConsentForSubscriptionResponse added in v0.1.5

type RevokeConsentForSubscriptionResponse struct {

	// The status code of the response.
	StatusCode v0.StatusCode `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3,enum=wgtwo.common.v0.StatusCode" json:"status_code,omitempty"`
	// The error message of the response. Empty for successes.
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

Revoke a consent for a subscription response.

func (*RevokeConsentForSubscriptionResponse) Descriptor deprecated added in v0.1.5

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

Deprecated: Use RevokeConsentForSubscriptionResponse.ProtoReflect.Descriptor instead.

func (*RevokeConsentForSubscriptionResponse) GetErrorMessage added in v0.1.5

func (x *RevokeConsentForSubscriptionResponse) GetErrorMessage() string

func (*RevokeConsentForSubscriptionResponse) GetStatusCode added in v0.1.5

func (*RevokeConsentForSubscriptionResponse) ProtoMessage added in v0.1.5

func (*RevokeConsentForSubscriptionResponse) ProtoMessage()

func (*RevokeConsentForSubscriptionResponse) ProtoReflect added in v0.1.5

func (*RevokeConsentForSubscriptionResponse) Reset added in v0.1.5

func (*RevokeConsentForSubscriptionResponse) String added in v0.1.5

type Scope

type Scope struct {

	// The name of the scope, e.g. `"subscription.consent:read"`.
	Property string `protobuf:"bytes,1,opt,name=property,proto3" json:"property,omitempty"`
	// contains filtered or unexported fields
}

The scope of a consent.

func (*Scope) Descriptor deprecated

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

Deprecated: Use Scope.ProtoReflect.Descriptor instead.

func (*Scope) GetProperty

func (x *Scope) GetProperty() string

func (*Scope) ProtoMessage

func (*Scope) ProtoMessage()

func (*Scope) ProtoReflect

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

func (*Scope) Reset

func (x *Scope) Reset()

func (*Scope) String

func (x *Scope) String() string

type Subscription

type Subscription struct {

	// The subscription identifier.
	SubscriptionIdentifier *v0.SubscriptionIdentifier `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

A subscription message.

func (*Subscription) Descriptor deprecated

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

Deprecated: Use Subscription.ProtoReflect.Descriptor instead.

func (*Subscription) GetSubscriptionIdentifier added in v0.1.5

func (x *Subscription) GetSubscriptionIdentifier() *v0.SubscriptionIdentifier

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 UnimplementedConsentServiceServer

type UnimplementedConsentServiceServer struct{}

UnimplementedConsentServiceServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedConsentServiceServer) CreateConsentForSubscription added in v0.1.5

func (UnimplementedConsentServiceServer) GetConsentsForSubscription added in v0.1.5

func (UnimplementedConsentServiceServer) RevokeConsentForSubscription added in v0.1.5

type UnsafeConsentServiceServer

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

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

Jump to

Keyboard shortcuts

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