notifications

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotificationCategory_name = map[int32]string{
		0: "NOTIFICATION_CATEGORY_UNSPECIFIED",
		1: "NOTIFICATION_CATEGORY_GENERAL",
		2: "NOTIFICATION_CATEGORY_DOCUMENT",
	}
	NotificationCategory_value = map[string]int32{
		"NOTIFICATION_CATEGORY_UNSPECIFIED": 0,
		"NOTIFICATION_CATEGORY_GENERAL":     1,
		"NOTIFICATION_CATEGORY_DOCUMENT":    2,
	}
)

Enum value maps for NotificationCategory.

View Source
var File_resources_notifications_notifications_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Data added in v0.6.0

type Data struct {
	Link     *Link            `protobuf:"bytes,1,opt,name=link,proto3,oneof" json:"link,omitempty"`
	CausedBy *users.UserShort `protobuf:"bytes,2,opt,name=caused_by,json=causedBy,proto3,oneof" json:"caused_by,omitempty"`
	// contains filtered or unexported fields
}

func (*Data) Descriptor deprecated added in v0.6.0

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

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetCausedBy added in v0.6.0

func (x *Data) GetCausedBy() *users.UserShort
func (x *Data) GetLink() *Link

func (*Data) ProtoMessage added in v0.6.0

func (*Data) ProtoMessage()

func (*Data) ProtoReflect added in v0.6.0

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

func (*Data) Reset added in v0.6.0

func (x *Data) Reset()

func (*Data) Scan added in v0.6.0

func (x *Data) Scan(value any) error

Scan implements driver.Valuer for protobuf Data.

func (*Data) String added in v0.6.0

func (x *Data) String() string

func (*Data) Validate added in v0.6.0

func (m *Data) Validate() error

Validate checks the field values on Data with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Data) ValidateAll added in v0.6.0

func (m *Data) ValidateAll() error

ValidateAll checks the field values on Data with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DataMultiError, or nil if none found.

func (*Data) Value added in v0.6.0

func (x *Data) Value() (driver.Value, error)

Value marshals the value into driver.Valuer.

type DataMultiError added in v0.6.0

type DataMultiError []error

DataMultiError is an error wrapping multiple validation errors returned by Data.ValidateAll() if the designated constraints aren't met.

func (DataMultiError) AllErrors added in v0.6.0

func (m DataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DataMultiError) Error added in v0.6.0

func (m DataMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type DataValidationError added in v0.6.0

type DataValidationError struct {
	// contains filtered or unexported fields
}

DataValidationError is the validation error returned by Data.Validate if the designated constraints aren't met.

func (DataValidationError) Cause added in v0.6.0

func (e DataValidationError) Cause() error

Cause function returns cause value.

func (DataValidationError) Error added in v0.6.0

func (e DataValidationError) Error() string

Error satisfies the builtin error interface

func (DataValidationError) ErrorName added in v0.6.0

func (e DataValidationError) ErrorName() string

ErrorName returns error name.

func (DataValidationError) Field added in v0.6.0

func (e DataValidationError) Field() string

Field function returns field value.

func (DataValidationError) Key added in v0.6.0

func (e DataValidationError) Key() bool

Key function returns key value.

func (DataValidationError) Reason added in v0.6.0

func (e DataValidationError) Reason() string

Reason function returns reason value.

type Link struct {
	To       string  `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
	Title    *string `protobuf:"bytes,2,opt,name=title,proto3,oneof" json:"title,omitempty"`
	External *bool   `protobuf:"varint,3,opt,name=external,proto3,oneof" json:"external,omitempty"`
	// contains filtered or unexported fields
}

func (*Link) Descriptor deprecated added in v0.6.0

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

Deprecated: Use Link.ProtoReflect.Descriptor instead.

func (*Link) GetExternal added in v0.6.0

func (x *Link) GetExternal() bool

func (*Link) GetTitle added in v0.6.0

func (x *Link) GetTitle() string

func (*Link) GetTo added in v0.6.0

func (x *Link) GetTo() string

func (*Link) ProtoMessage added in v0.6.0

func (*Link) ProtoMessage()

func (*Link) ProtoReflect added in v0.6.0

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

func (*Link) Reset added in v0.6.0

func (x *Link) Reset()

func (*Link) String added in v0.6.0

func (x *Link) String() string

func (*Link) Validate added in v0.6.0

func (m *Link) Validate() error

Validate checks the field values on Link with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Link) ValidateAll added in v0.6.0

func (m *Link) ValidateAll() error

ValidateAll checks the field values on Link with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LinkMultiError, or nil if none found.

type LinkMultiError added in v0.6.0

type LinkMultiError []error

LinkMultiError is an error wrapping multiple validation errors returned by Link.ValidateAll() if the designated constraints aren't met.

func (LinkMultiError) AllErrors added in v0.6.0

func (m LinkMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LinkMultiError) Error added in v0.6.0

func (m LinkMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type LinkValidationError added in v0.6.0

type LinkValidationError struct {
	// contains filtered or unexported fields
}

LinkValidationError is the validation error returned by Link.Validate if the designated constraints aren't met.

func (LinkValidationError) Cause added in v0.6.0

func (e LinkValidationError) Cause() error

Cause function returns cause value.

func (LinkValidationError) Error added in v0.6.0

func (e LinkValidationError) Error() string

Error satisfies the builtin error interface

func (LinkValidationError) ErrorName added in v0.6.0

func (e LinkValidationError) ErrorName() string

ErrorName returns error name.

func (LinkValidationError) Field added in v0.6.0

func (e LinkValidationError) Field() string

Field function returns field value.

func (LinkValidationError) Key added in v0.6.0

func (e LinkValidationError) Key() bool

Key function returns key value.

func (LinkValidationError) Reason added in v0.6.0

func (e LinkValidationError) Reason() string

Reason function returns reason value.

type Notification

type Notification struct {
	Id        uint64               `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedAt *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	ReadAt    *timestamp.Timestamp `protobuf:"bytes,3,opt,name=read_at,json=readAt,proto3" json:"read_at,omitempty"`
	UserId    int32                `protobuf:"varint,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// @sanitize
	Title *common.TranslateItem `protobuf:"bytes,5,opt,name=title,proto3" json:"title,omitempty"`
	Type  *string               `protobuf:"bytes,6,opt,name=type,proto3,oneof" json:"type,omitempty"`
	// @sanitize
	Content  *common.TranslateItem `protobuf:"bytes,7,opt,name=content,proto3" json:"content,omitempty"`
	Category NotificationCategory  `protobuf:"varint,8,opt,name=category,proto3,enum=resources.notifications.NotificationCategory" json:"category,omitempty"`
	Data     *Data                 `protobuf:"bytes,9,opt,name=data,proto3,oneof" json:"data,omitempty"`
	Starred  *bool                 `protobuf:"varint,10,opt,name=starred,proto3,oneof" json:"starred,omitempty"`
	// contains filtered or unexported fields
}

func (*Notification) Descriptor deprecated

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

Deprecated: Use Notification.ProtoReflect.Descriptor instead.

func (*Notification) GetCategory added in v0.6.0

func (x *Notification) GetCategory() NotificationCategory

func (*Notification) GetContent

func (x *Notification) GetContent() *common.TranslateItem

func (*Notification) GetCreatedAt

func (x *Notification) GetCreatedAt() *timestamp.Timestamp

func (*Notification) GetData

func (x *Notification) GetData() *Data

func (*Notification) GetId

func (x *Notification) GetId() uint64

func (*Notification) GetReadAt

func (x *Notification) GetReadAt() *timestamp.Timestamp

func (*Notification) GetStarred added in v0.8.10

func (x *Notification) GetStarred() bool

func (*Notification) GetTitle

func (x *Notification) GetTitle() *common.TranslateItem

func (*Notification) GetType

func (x *Notification) GetType() string

func (*Notification) GetUserId

func (x *Notification) GetUserId() int32

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) ProtoReflect

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

func (*Notification) Reset

func (x *Notification) Reset()

func (*Notification) String

func (x *Notification) String() string

func (*Notification) Validate

func (m *Notification) Validate() error

Validate checks the field values on Notification with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Notification) ValidateAll

func (m *Notification) ValidateAll() error

ValidateAll checks the field values on Notification with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in NotificationMultiError, or nil if none found.

type NotificationCategory added in v0.8.3

type NotificationCategory int32
const (
	NotificationCategory_NOTIFICATION_CATEGORY_UNSPECIFIED NotificationCategory = 0
	NotificationCategory_NOTIFICATION_CATEGORY_GENERAL     NotificationCategory = 1
	NotificationCategory_NOTIFICATION_CATEGORY_DOCUMENT    NotificationCategory = 2
)

func (NotificationCategory) Descriptor added in v0.8.3

func (NotificationCategory) Enum added in v0.8.3

func (NotificationCategory) EnumDescriptor deprecated added in v0.8.3

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

Deprecated: Use NotificationCategory.Descriptor instead.

func (NotificationCategory) Number added in v0.8.3

func (NotificationCategory) String added in v0.8.3

func (x NotificationCategory) String() string

func (NotificationCategory) Type added in v0.8.3

type NotificationMultiError

type NotificationMultiError []error

NotificationMultiError is an error wrapping multiple validation errors returned by Notification.ValidateAll() if the designated constraints aren't met.

func (NotificationMultiError) AllErrors

func (m NotificationMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (NotificationMultiError) Error

func (m NotificationMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type NotificationValidationError

type NotificationValidationError struct {
	// contains filtered or unexported fields
}

NotificationValidationError is the validation error returned by Notification.Validate if the designated constraints aren't met.

func (NotificationValidationError) Cause

Cause function returns cause value.

func (NotificationValidationError) Error

Error satisfies the builtin error interface

func (NotificationValidationError) ErrorName

func (e NotificationValidationError) ErrorName() string

ErrorName returns error name.

func (NotificationValidationError) Field

Field function returns field value.

func (NotificationValidationError) Key

Key function returns key value.

func (NotificationValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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