types

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	To      []string
	Subject string
	Body    string
}

func NewEmail

func NewEmail(to []string, subject, body string) Email

NewEmail creates a new Email object with the specified recipients, subject, and body.

type MessagePublishedData

type MessagePublishedData struct {
	Message PubSubMessage
}

MessagePublishedData contains the full Pub/Sub message See the documentation for more details: https://cloud.google.com/eventarc/docs/cloudevents#pubsub

type PubSubMessage

type PubSubMessage struct {
	Data []byte `json:"data"`
}

PubSubMessage is the payload of a Pub/Sub event. See the documentation for more details: https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage

type UserClaims added in v1.1.3

type UserClaims struct {
	ID             string       `json:"id"`
	Name           string       `json:"name"`
	LastName       string       `json:"lastName"`
	ProfilePicture string       `json:"profilePicture"`
	Email          string       `json:"email"`
	Roles          []enums.Role `json:"roles"`
	IsConfirmed    bool         `json:"isConfirmed"`
	IsBlocked      bool         `json:"isBlocked"`
	jwt.StandardClaims
}

UserClaims represents the claims of a user in the system.

func (*UserClaims) IsAdmin added in v1.1.3

func (uc *UserClaims) IsAdmin() bool

IsAdmin checks if the user has the admin role.

func (*UserClaims) IsAuthor added in v1.1.3

func (uc *UserClaims) IsAuthor() bool

IsAuthor checks if the user has the author role.

func (*UserClaims) IsEditor added in v1.1.3

func (uc *UserClaims) IsEditor() bool

IsEditor checks if the user has the editor role.

func (*UserClaims) IsUser added in v1.1.3

func (uc *UserClaims) IsUser() bool

IsUser checks if the user has the user role.

Jump to

Keyboard shortcuts

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