microsvc

package
v0.0.0-...-a0d1ad3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountServiceName  = "account"
	ActivityServiceName = "activity"
	ActorServiceName    = "actor"
	ArticleServiceName  = "article"
	AuthServiceName     = "auth"
	ChannelServiceName  = "channel"
	DeviceServiceName   = "device"
	FsServiceName       = "fs"
	MessageServiceName  = "message"
	NotifyServiceName   = "notify"
	PublicServiceName   = "public"
	SavedServiceName    = "saved"
)

Variables

This section is empty.

Functions

func GetGRPCServiceAddress

func GetGRPCServiceAddress(name string) string

func GetRestServiceAddress

func GetRestServiceAddress(name string) string

func GetUserAgent

func GetUserAgent(ctx context.Context) string

Types

type Cfg

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

func New

func New(opts ...Option) *Cfg

func (*Cfg) ListenerWithEndpoints

func (c *Cfg) ListenerWithEndpoints() *server

type Option

type Option func(o *options)

func WithServiceID

func WithServiceID(id string) Option

func WithServiceName

func WithServiceName(name string) Option

func WithServiceVersion

func WithServiceVersion(version string) Option

type URLs

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

type Userdata

type Userdata struct {
	AccountId uint
	ActorId   uint
	DeviceID  uint
	Username  string
	Mail      string
}

func GetUserdataByAuthorizationToken

func GetUserdataByAuthorizationToken(ctx context.Context) (*Userdata, error)

func (*Userdata) GetAccountId

func (x *Userdata) GetAccountId() uint

func (*Userdata) GetActorId

func (x *Userdata) GetActorId() uint

func (*Userdata) GetDeviceId

func (x *Userdata) GetDeviceId() uint

func (*Userdata) GetMail

func (x *Userdata) GetMail() string

func (*Userdata) GetUsername

func (x *Userdata) GetUsername() string

Jump to

Keyboard shortcuts

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