Files
slash-e/proto/gen/api/v1/subscription_service.pb.go
T

379 lines
13 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.7
// protoc (unknown)
// source: api/v1/subscription_service.proto
package apiv1
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PlanType int32
const (
PlanType_PLAN_TYPE_UNSPECIFIED PlanType = 0
PlanType_FREE PlanType = 1
PlanType_PRO PlanType = 2
PlanType_ENTERPRISE PlanType = 3
)
// Enum value maps for PlanType.
var (
PlanType_name = map[int32]string{
0: "PLAN_TYPE_UNSPECIFIED",
1: "FREE",
2: "PRO",
3: "ENTERPRISE",
}
PlanType_value = map[string]int32{
"PLAN_TYPE_UNSPECIFIED": 0,
"FREE": 1,
"PRO": 2,
"ENTERPRISE": 3,
}
)
func (x PlanType) Enum() *PlanType {
p := new(PlanType)
*p = x
return p
}
func (x PlanType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PlanType) Descriptor() protoreflect.EnumDescriptor {
return file_api_v1_subscription_service_proto_enumTypes[0].Descriptor()
}
func (PlanType) Type() protoreflect.EnumType {
return &file_api_v1_subscription_service_proto_enumTypes[0]
}
func (x PlanType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PlanType.Descriptor instead.
func (PlanType) EnumDescriptor() ([]byte, []int) {
return file_api_v1_subscription_service_proto_rawDescGZIP(), []int{0}
}
type Subscription struct {
state protoimpl.MessageState `protogen:"open.v1"`
Plan PlanType `protobuf:"varint,1,opt,name=plan,proto3,enum=slash.api.v1.PlanType" json:"plan,omitempty"`
StartedTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=started_time,json=startedTime,proto3" json:"started_time,omitempty"`
ExpiresTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_time,json=expiresTime,proto3" json:"expires_time,omitempty"`
Features []string `protobuf:"bytes,4,rep,name=features,proto3" json:"features,omitempty"`
Seats int32 `protobuf:"varint,5,opt,name=seats,proto3" json:"seats,omitempty"`
ShortcutsLimit int32 `protobuf:"varint,6,opt,name=shortcuts_limit,json=shortcutsLimit,proto3" json:"shortcuts_limit,omitempty"`
CollectionsLimit int32 `protobuf:"varint,7,opt,name=collections_limit,json=collectionsLimit,proto3" json:"collections_limit,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *Subscription) Reset() {
*x = Subscription{}
mi := &file_api_v1_subscription_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *Subscription) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Subscription) ProtoMessage() {}
func (x *Subscription) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_subscription_service_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Subscription.ProtoReflect.Descriptor instead.
func (*Subscription) Descriptor() ([]byte, []int) {
return file_api_v1_subscription_service_proto_rawDescGZIP(), []int{0}
}
func (x *Subscription) GetPlan() PlanType {
if x != nil {
return x.Plan
}
return PlanType_PLAN_TYPE_UNSPECIFIED
}
func (x *Subscription) GetStartedTime() *timestamppb.Timestamp {
if x != nil {
return x.StartedTime
}
return nil
}
func (x *Subscription) GetExpiresTime() *timestamppb.Timestamp {
if x != nil {
return x.ExpiresTime
}
return nil
}
func (x *Subscription) GetFeatures() []string {
if x != nil {
return x.Features
}
return nil
}
func (x *Subscription) GetSeats() int32 {
if x != nil {
return x.Seats
}
return 0
}
func (x *Subscription) GetShortcutsLimit() int32 {
if x != nil {
return x.ShortcutsLimit
}
return 0
}
func (x *Subscription) GetCollectionsLimit() int32 {
if x != nil {
return x.CollectionsLimit
}
return 0
}
type GetSubscriptionRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *GetSubscriptionRequest) Reset() {
*x = GetSubscriptionRequest{}
mi := &file_api_v1_subscription_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *GetSubscriptionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetSubscriptionRequest) ProtoMessage() {}
func (x *GetSubscriptionRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_subscription_service_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*GetSubscriptionRequest) Descriptor() ([]byte, []int) {
return file_api_v1_subscription_service_proto_rawDescGZIP(), []int{1}
}
type UpdateSubscriptionRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
LicenseKey string `protobuf:"bytes,1,opt,name=license_key,json=licenseKey,proto3" json:"license_key,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UpdateSubscriptionRequest) Reset() {
*x = UpdateSubscriptionRequest{}
mi := &file_api_v1_subscription_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UpdateSubscriptionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateSubscriptionRequest) ProtoMessage() {}
func (x *UpdateSubscriptionRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_subscription_service_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*UpdateSubscriptionRequest) Descriptor() ([]byte, []int) {
return file_api_v1_subscription_service_proto_rawDescGZIP(), []int{2}
}
func (x *UpdateSubscriptionRequest) GetLicenseKey() string {
if x != nil {
return x.LicenseKey
}
return ""
}
type DeleteSubscriptionRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DeleteSubscriptionRequest) Reset() {
*x = DeleteSubscriptionRequest{}
mi := &file_api_v1_subscription_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DeleteSubscriptionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteSubscriptionRequest) ProtoMessage() {}
func (x *DeleteSubscriptionRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_subscription_service_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteSubscriptionRequest.ProtoReflect.Descriptor instead.
func (*DeleteSubscriptionRequest) Descriptor() ([]byte, []int) {
return file_api_v1_subscription_service_proto_rawDescGZIP(), []int{3}
}
var File_api_v1_subscription_service_proto protoreflect.FileDescriptor
const file_api_v1_subscription_service_proto_rawDesc = "" +
"\n" +
"!api/v1/subscription_service.proto\x12\fslash.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xea\x02\n" +
"\fSubscription\x120\n" +
"\x04plan\x18\x01 \x01(\x0e2\x16.slash.api.v1.PlanTypeB\x04\xe2A\x01\x03R\x04plan\x12C\n" +
"\fstarted_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe2A\x01\x03R\vstartedTime\x12C\n" +
"\fexpires_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe2A\x01\x03R\vexpiresTime\x12 \n" +
"\bfeatures\x18\x04 \x03(\tB\x04\xe2A\x01\x03R\bfeatures\x12\x1a\n" +
"\x05seats\x18\x05 \x01(\x05B\x04\xe2A\x01\x03R\x05seats\x12-\n" +
"\x0fshortcuts_limit\x18\x06 \x01(\x05B\x04\xe2A\x01\x03R\x0eshortcutsLimit\x121\n" +
"\x11collections_limit\x18\a \x01(\x05B\x04\xe2A\x01\x03R\x10collectionsLimit\"\x18\n" +
"\x16GetSubscriptionRequest\"B\n" +
"\x19UpdateSubscriptionRequest\x12%\n" +
"\vlicense_key\x18\x01 \x01(\tB\x04\xe2A\x01\x02R\n" +
"licenseKey\"\x1b\n" +
"\x19DeleteSubscriptionRequest*H\n" +
"\bPlanType\x12\x19\n" +
"\x15PLAN_TYPE_UNSPECIFIED\x10\x00\x12\b\n" +
"\x04FREE\x10\x01\x12\a\n" +
"\x03PRO\x10\x02\x12\x0e\n" +
"\n" +
"ENTERPRISE\x10\x032\xf1\x02\n" +
"\x13SubscriptionService\x12m\n" +
"\x0fGetSubscription\x12$.slash.api.v1.GetSubscriptionRequest\x1a\x1a.slash.api.v1.Subscription\"\x18\x82\xd3\xe4\x93\x02\x12\x12\x10/v1/subscription\x12v\n" +
"\x12UpdateSubscription\x12'.slash.api.v1.UpdateSubscriptionRequest\x1a\x1a.slash.api.v1.Subscription\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*2\x10/v1/subscription\x12s\n" +
"\x12DeleteSubscription\x12'.slash.api.v1.DeleteSubscriptionRequest\x1a\x1a.slash.api.v1.Subscription\"\x18\x82\xd3\xe4\x93\x02\x12*\x10/v1/subscriptionB\xb6\x01\n" +
"\x10com.slash.api.v1B\x18SubscriptionServiceProtoP\x01Z6github.com/yourselfhosted/slash/proto/gen/api/v1;apiv1\xa2\x02\x03SAX\xaa\x02\fSlash.Api.V1\xca\x02\fSlash\\Api\\V1\xe2\x02\x18Slash\\Api\\V1\\GPBMetadata\xea\x02\x0eSlash::Api::V1b\x06proto3"
var (
file_api_v1_subscription_service_proto_rawDescOnce sync.Once
file_api_v1_subscription_service_proto_rawDescData []byte
)
func file_api_v1_subscription_service_proto_rawDescGZIP() []byte {
file_api_v1_subscription_service_proto_rawDescOnce.Do(func() {
file_api_v1_subscription_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_v1_subscription_service_proto_rawDesc), len(file_api_v1_subscription_service_proto_rawDesc)))
})
return file_api_v1_subscription_service_proto_rawDescData
}
var file_api_v1_subscription_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_api_v1_subscription_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_api_v1_subscription_service_proto_goTypes = []any{
(PlanType)(0), // 0: slash.api.v1.PlanType
(*Subscription)(nil), // 1: slash.api.v1.Subscription
(*GetSubscriptionRequest)(nil), // 2: slash.api.v1.GetSubscriptionRequest
(*UpdateSubscriptionRequest)(nil), // 3: slash.api.v1.UpdateSubscriptionRequest
(*DeleteSubscriptionRequest)(nil), // 4: slash.api.v1.DeleteSubscriptionRequest
(*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
}
var file_api_v1_subscription_service_proto_depIdxs = []int32{
0, // 0: slash.api.v1.Subscription.plan:type_name -> slash.api.v1.PlanType
5, // 1: slash.api.v1.Subscription.started_time:type_name -> google.protobuf.Timestamp
5, // 2: slash.api.v1.Subscription.expires_time:type_name -> google.protobuf.Timestamp
2, // 3: slash.api.v1.SubscriptionService.GetSubscription:input_type -> slash.api.v1.GetSubscriptionRequest
3, // 4: slash.api.v1.SubscriptionService.UpdateSubscription:input_type -> slash.api.v1.UpdateSubscriptionRequest
4, // 5: slash.api.v1.SubscriptionService.DeleteSubscription:input_type -> slash.api.v1.DeleteSubscriptionRequest
1, // 6: slash.api.v1.SubscriptionService.GetSubscription:output_type -> slash.api.v1.Subscription
1, // 7: slash.api.v1.SubscriptionService.UpdateSubscription:output_type -> slash.api.v1.Subscription
1, // 8: slash.api.v1.SubscriptionService.DeleteSubscription:output_type -> slash.api.v1.Subscription
6, // [6:9] is the sub-list for method output_type
3, // [3:6] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_api_v1_subscription_service_proto_init() }
func file_api_v1_subscription_service_proto_init() {
if File_api_v1_subscription_service_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_v1_subscription_service_proto_rawDesc), len(file_api_v1_subscription_service_proto_rawDesc)),
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_v1_subscription_service_proto_goTypes,
DependencyIndexes: file_api_v1_subscription_service_proto_depIdxs,
EnumInfos: file_api_v1_subscription_service_proto_enumTypes,
MessageInfos: file_api_v1_subscription_service_proto_msgTypes,
}.Build()
File_api_v1_subscription_service_proto = out.File
file_api_v1_subscription_service_proto_goTypes = nil
file_api_v1_subscription_service_proto_depIdxs = nil
}