model

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Code generated by protoc-gen-api. DO NOT EDIT. source: malonaz/test/user/v1/organization.proto

Code generated by protoc-gen-api. DO NOT EDIT. source: malonaz/test/user/v1/user.proto

Code generated by protoc-gen-api. DO NOT EDIT. source: malonaz/test/user/v1/user_profile.proto

Index

Constants

This section is empty.

Variables

View Source
var ErrOrganizationAlreadyDeleted = errors.New("organization already deleted")
View Source
var ErrOrganizationAlreadyExists = errors.New("organization already exists")
View Source
var ErrOrganizationETagChanged = errors.New("organization etag changed")
View Source
var ErrOrganizationNotExist = errors.New("organization does not exist")
View Source
var ErrUserAlreadyDeleted = errors.New("user already deleted")
View Source
var ErrUserAlreadyExists = errors.New("user already exists")
View Source
var ErrUserETagChanged = errors.New("user etag changed")
View Source
var ErrUserNotExist = errors.New("user does not exist")
View Source
var ErrUserProfileAlreadyDeleted = errors.New("user_profile already deleted")
View Source
var ErrUserProfileAlreadyExists = errors.New("user_profile already exists")
View Source
var ErrUserProfileETagChanged = errors.New("user_profile etag changed")
View Source
var ErrUserProfileNotExist = errors.New("user_profile does not exist")

Functions

func ParseOrganizationName

func ParseOrganizationName(name string) (string, error)

func ParseUserName

func ParseUserName(name string) (string, string, error)

func ParseUserProfileName

func ParseUserProfileName(name string) (string, string, error)

Types

type Organization

type Organization struct {
	OrganizationID string     `db:"organization_id" schema:"public" table:"organization"`
	CreateTime     time.Time  `db:"create_time" schema:"public" table:"organization"`
	UpdateTime     time.Time  `db:"update_time" schema:"public" table:"organization"`
	DeleteTime     *time.Time `db:"delete_time" schema:"public" table:"organization"`
	DisplayName    string     `db:"display_name" schema:"public" table:"organization"`
	Labels         []byte     `db:"labels" schema:"public" table:"organization"`
	Etag           string     `db:"etag" schema:"public" table:"organization"`
}

func OrganizationFromPb

func OrganizationFromPb(m *v1.Organization) (*Organization, error)

func (*Organization) ToPb

func (m *Organization) ToPb() (*v1.Organization, error)

type User

type User struct {
	OrganizationID string           `db:"organization_id" schema:"public" table:"user_"`
	UserID         string           `db:"id" schema:"public" table:"user_"`
	CreateTime     time.Time        `db:"create_time" schema:"public" table:"user_"`
	UpdateTime     time.Time        `db:"update_time" schema:"public" table:"user_"`
	DeleteTime     *time.Time       `db:"delete_time" schema:"public" table:"user_"`
	DisplayName    string           `db:"display_name" schema:"public" table:"user_"`
	EmailAddress   string           `db:"email_address" schema:"public" table:"user_"`
	PhoneNumber    string           `db:"phone_number_renamed" schema:"public" table:"user_"`
	Labels         []byte           `db:"labels" schema:"public" table:"user_"`
	Etag           string           `db:"etag" schema:"public" table:"user_"`
	Metadata       []byte           `db:"metadata" schema:"public" table:"user_"`
	Balance        decimal.Decimal  `db:"balance" schema:"public" table:"user_"`
	CreditLimit    *decimal.Decimal `db:"credit_limit" schema:"public" table:"user_"`
}

func UserFromPb

func UserFromPb(m *v1.User) (*User, error)

func (*User) ToPb

func (m *User) ToPb() (*v1.User, error)

type UserProfile

type UserProfile struct {
	OrganizationID          string     `db:"organization_id" schema:"public" table:"user_profile"`
	UserID                  string     `db:"user_id" schema:"public" table:"user_profile"`
	CreateTime              time.Time  `db:"create_time" schema:"public" table:"user_profile"`
	UpdateTime              time.Time  `db:"update_time" schema:"public" table:"user_profile"`
	DeleteTime              *time.Time `db:"delete_time" schema:"public" table:"user_profile"`
	Bio                     string     `db:"bio" schema:"public" table:"user_profile"`
	AvatarUrl               string     `db:"avatar_url" schema:"public" table:"user_profile"`
	Etag                    string     `db:"etag" schema:"public" table:"user_profile"`
	Labels                  []byte     `db:"labels" schema:"public" table:"user_profile"`
	Metadata                []byte     `db:"metadata" schema:"public" table:"user_profile"`
	UserDisplayName         string     `db:"user_display_name" external:"true" join_schema:"public" join_table:"user_" join_column:"display_name"`
	UserEmailAddress        string     `db:"user_email_address" external:"true" join_schema:"public" join_table:"user_" join_column:"email_address"`
	OrganizationDisplayName string     `db:"organization_display_name" external:"true" join_schema:"public" join_table:"organization" join_column:"display_name"`
}

func UserProfileFromPb

func UserProfileFromPb(m *v1.UserProfile) (*UserProfile, error)

func (*UserProfile) ToPb

func (m *UserProfile) ToPb() (*v1.UserProfile, error)

Jump to

Keyboard shortcuts

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