examplepb

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Layer_name = map[int32]string{
		0: "LAYER_UNSPECIFIED",
		1: "LAYER_GLOBAL",
		2: "LAYER_USER",
		3: "LAYER_ENTITY",
	}
	Layer_value = map[string]int32{
		"LAYER_UNSPECIFIED": 0,
		"LAYER_GLOBAL":      1,
		"LAYER_USER":        2,
		"LAYER_ENTITY":      3,
	}
)

Enum value maps for Layer.

View Source
var File_example_notifications_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Layer added in v0.6.0

type Layer int32

Layer defines the override dimensions for this flag system. Each non-global value represents a dimension along which flags can vary.

const (
	Layer_LAYER_UNSPECIFIED Layer = 0
	Layer_LAYER_GLOBAL      Layer = 1
	Layer_LAYER_USER        Layer = 2
	Layer_LAYER_ENTITY      Layer = 3
)

func (Layer) Descriptor added in v0.6.0

func (Layer) Descriptor() protoreflect.EnumDescriptor

func (Layer) Enum added in v0.6.0

func (x Layer) Enum() *Layer

func (Layer) EnumDescriptor deprecated added in v0.6.0

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

Deprecated: Use Layer.Descriptor instead.

func (Layer) Number added in v0.6.0

func (x Layer) Number() protoreflect.EnumNumber

func (Layer) String added in v0.6.0

func (x Layer) String() string

func (Layer) Type added in v0.6.0

func (Layer) Type() protoreflect.EnumType

type Notifications

type Notifications struct {

	// Enable email notifications globally or per-user.
	EmailEnabled bool `protobuf:"varint,1,opt,name=email_enabled,json=emailEnabled,proto3" json:"email_enabled,omitempty"`
	// How often to send digest emails.
	DigestFrequency string `protobuf:"bytes,2,opt,name=digest_frequency,json=digestFrequency,proto3" json:"digest_frequency,omitempty"`
	// Maximum retry attempts for notification delivery.
	MaxRetries int64 `protobuf:"varint,3,opt,name=max_retries,json=maxRetries,proto3" json:"max_retries,omitempty"`
	// Minimum score threshold for triggering notifications.
	ScoreThreshold float64 `protobuf:"fixed64,4,opt,name=score_threshold,json=scoreThreshold,proto3" json:"score_threshold,omitempty"`
	// contains filtered or unexported fields
}

Notifications demonstrates how to define a feature with multiple flags. Each field annotated with (pbflags.flag) becomes a runtime-configurable flag.

func (*Notifications) Descriptor deprecated

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

Deprecated: Use Notifications.ProtoReflect.Descriptor instead.

func (*Notifications) GetDigestFrequency

func (x *Notifications) GetDigestFrequency() string

func (*Notifications) GetEmailEnabled

func (x *Notifications) GetEmailEnabled() bool

func (*Notifications) GetMaxRetries

func (x *Notifications) GetMaxRetries() int64

func (*Notifications) GetScoreThreshold

func (x *Notifications) GetScoreThreshold() float64

func (*Notifications) ProtoMessage

func (*Notifications) ProtoMessage()

func (*Notifications) ProtoReflect

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

func (*Notifications) Reset

func (x *Notifications) Reset()

func (*Notifications) String

func (x *Notifications) String() string

Jump to

Keyboard shortcuts

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