samplepb

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Role_name = map[int32]string{
		0: "ROLE_UNSPECIFIED",
		1: "ROLE_READER",
		2: "ROLE_EDITOR",
		3: "ROLE_ADMIN",
	}
	Role_value = map[string]int32{
		"ROLE_UNSPECIFIED": 0,
		"ROLE_READER":      1,
		"ROLE_EDITOR":      2,
		"ROLE_ADMIN":       3,
	}
)

Enum value maps for Role.

View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var File_users_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Address

type Address struct {
	Lines       []string `protobuf:"bytes,1,rep,name=lines,proto3" json:"lines,omitempty"`
	City        string   `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"`
	PostalCode  string   `protobuf:"bytes,3,opt,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"`
	CountryCode string   `protobuf:"bytes,4,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"`
	// contains filtered or unexported fields
}

func (*Address) Descriptor deprecated

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

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetCity

func (x *Address) GetCity() string

func (*Address) GetCountryCode

func (x *Address) GetCountryCode() string

func (*Address) GetLines

func (x *Address) GetLines() []string

func (*Address) GetPostalCode

func (x *Address) GetPostalCode() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

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

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

type GetUserRequest

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

func (*GetUserRequest) Descriptor deprecated

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

Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.

func (*GetUserRequest) GetId

func (x *GetUserRequest) GetId() 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 *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

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 ListUsersRequest

type ListUsersRequest struct {
	Ids  []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	Role *Role    `protobuf:"varint,2,opt,name=role,proto3,enum=spectre.sample.v1.Role,oneof" json:"role,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUsersRequest) Descriptor deprecated

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

Deprecated: Use ListUsersRequest.ProtoReflect.Descriptor instead.

func (*ListUsersRequest) GetIds

func (x *ListUsersRequest) GetIds() []string

func (*ListUsersRequest) GetRole

func (x *ListUsersRequest) GetRole() Role

func (*ListUsersRequest) ProtoMessage

func (*ListUsersRequest) ProtoMessage()

func (*ListUsersRequest) ProtoReflect

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

func (*ListUsersRequest) Reset

func (x *ListUsersRequest) Reset()

func (*ListUsersRequest) String

func (x *ListUsersRequest) String() string

type ListUsersResponse

type ListUsersResponse struct {
	Users       []*User                `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	GeneratedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=generated_at,json=generatedAt,proto3" json:"generated_at,omitempty"`
	TotalCount  int64                  `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
	// contains filtered or unexported fields
}

func (*ListUsersResponse) Descriptor deprecated

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

Deprecated: Use ListUsersResponse.ProtoReflect.Descriptor instead.

func (*ListUsersResponse) GetGeneratedAt

func (x *ListUsersResponse) GetGeneratedAt() *timestamppb.Timestamp

func (*ListUsersResponse) GetTotalCount

func (x *ListUsersResponse) GetTotalCount() int64

func (*ListUsersResponse) GetUsers

func (x *ListUsersResponse) GetUsers() []*User

func (*ListUsersResponse) ProtoMessage

func (*ListUsersResponse) ProtoMessage()

func (*ListUsersResponse) ProtoReflect

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

func (*ListUsersResponse) Reset

func (x *ListUsersResponse) Reset()

func (*ListUsersResponse) String

func (x *ListUsersResponse) String() string

type Phone

type Phone struct {
	CountryCode string  `protobuf:"bytes,1,opt,name=country_code,json=countryCode,proto3" json:"country_code,omitempty"`
	Number      string  `protobuf:"bytes,2,opt,name=number,proto3" json:"number,omitempty"`
	Extension   *string `protobuf:"bytes,3,opt,name=extension,proto3,oneof" json:"extension,omitempty"`
	// contains filtered or unexported fields
}

func (*Phone) Descriptor deprecated

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

Deprecated: Use Phone.ProtoReflect.Descriptor instead.

func (*Phone) GetCountryCode

func (x *Phone) GetCountryCode() string

func (*Phone) GetExtension

func (x *Phone) GetExtension() string

func (*Phone) GetNumber

func (x *Phone) GetNumber() string

func (*Phone) ProtoMessage

func (*Phone) ProtoMessage()

func (*Phone) ProtoReflect

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

func (*Phone) Reset

func (x *Phone) Reset()

func (*Phone) String

func (x *Phone) String() string

type Preference

type Preference struct {

	// Types that are valid to be assigned to Value:
	//
	//	*Preference_Text
	//	*Preference_Enabled
	//	*Preference_Weight
	Value isPreference_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*Preference) Descriptor deprecated

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

Deprecated: Use Preference.ProtoReflect.Descriptor instead.

func (*Preference) GetEnabled

func (x *Preference) GetEnabled() bool

func (*Preference) GetText

func (x *Preference) GetText() string

func (*Preference) GetValue

func (x *Preference) GetValue() isPreference_Value

func (*Preference) GetWeight

func (x *Preference) GetWeight() float64

func (*Preference) ProtoMessage

func (*Preference) ProtoMessage()

func (*Preference) ProtoReflect

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

func (*Preference) Reset

func (x *Preference) Reset()

func (*Preference) String

func (x *Preference) String() string

type Preference_Enabled

type Preference_Enabled struct {
	Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3,oneof"`
}

type Preference_Text

type Preference_Text struct {
	Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}

type Preference_Weight

type Preference_Weight struct {
	Weight float64 `protobuf:"fixed64,3,opt,name=weight,proto3,oneof"`
}

type Role

type Role int32
const (
	Role_ROLE_UNSPECIFIED Role = 0
	Role_ROLE_READER      Role = 1
	Role_ROLE_EDITOR      Role = 2
	Role_ROLE_ADMIN       Role = 3
)

func (Role) Descriptor

func (Role) Descriptor() protoreflect.EnumDescriptor

func (Role) Enum

func (x Role) Enum() *Role

func (Role) EnumDescriptor deprecated

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

Deprecated: Use Role.Descriptor instead.

func (Role) Number

func (x Role) Number() protoreflect.EnumNumber

func (Role) String

func (x Role) String() string

func (Role) Type

func (Role) Type() protoreflect.EnumType

type User

type User struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name      string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Nickname  *string                `protobuf:"bytes,3,opt,name=nickname,proto3,oneof" json:"nickname,omitempty"`
	Roles     []Role                 `protobuf:"varint,4,rep,packed,name=roles,proto3,enum=spectre.sample.v1.Role" json:"roles,omitempty"`
	Labels    map[string]string      `` /* 139-byte string literal not displayed */
	Profile   *User_Profile          `protobuf:"bytes,6,opt,name=profile,proto3" json:"profile,omitempty"`
	Avatar    []byte                 `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"`
	Revision  uint64                 `protobuf:"varint,8,opt,name=revision,proto3" json:"revision,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Types that are valid to be assigned to Contact:
	//
	//	*User_Email
	//	*User_Phone
	Contact isUser_Contact `protobuf_oneof:"contact"`
	// contains filtered or unexported fields
}

User exercises presence, nested collections, and values that need special JSON encoding.

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAvatar

func (x *User) GetAvatar() []byte

func (*User) GetContact

func (x *User) GetContact() isUser_Contact

func (*User) GetCreatedAt

func (x *User) GetCreatedAt() *timestamppb.Timestamp

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() string

func (*User) GetLabels

func (x *User) GetLabels() map[string]string

func (*User) GetName

func (x *User) GetName() string

func (*User) GetNickname

func (x *User) GetNickname() string

func (*User) GetPhone

func (x *User) GetPhone() *Phone

func (*User) GetProfile

func (x *User) GetProfile() *User_Profile

func (*User) GetRevision

func (x *User) GetRevision() uint64

func (*User) GetRoles

func (x *User) GetRoles() []Role

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

type User_Email

type User_Email struct {
	Email string `protobuf:"bytes,10,opt,name=email,proto3,oneof"`
}

type User_Phone

type User_Phone struct {
	Phone *Phone `protobuf:"bytes,11,opt,name=phone,proto3,oneof"`
}

type User_Profile

type User_Profile struct {
	Addresses        []*Address             `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	MarketingConsent *bool                  `protobuf:"varint,2,opt,name=marketing_consent,json=marketingConsent,proto3,oneof" json:"marketing_consent,omitempty"`
	Preferences      map[string]*Preference `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*User_Profile) Descriptor deprecated

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

Deprecated: Use User_Profile.ProtoReflect.Descriptor instead.

func (*User_Profile) GetAddresses

func (x *User_Profile) GetAddresses() []*Address

func (*User_Profile) GetMarketingConsent

func (x *User_Profile) GetMarketingConsent() bool

func (*User_Profile) GetPreferences

func (x *User_Profile) GetPreferences() map[string]*Preference

func (*User_Profile) ProtoMessage

func (*User_Profile) ProtoMessage()

func (*User_Profile) ProtoReflect

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

func (*User_Profile) Reset

func (x *User_Profile) Reset()

func (*User_Profile) String

func (x *User_Profile) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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