company

package
v1.19.25 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAvatar

func SetAvatar(ctx context.Context, companyID primitive.ObjectID, newAvatar Link) error

func SetTechIDs

func SetTechIDs(ctx context.Context, companyID primitive.ObjectID, techIDs []primitive.ObjectID) error

Types

type Company

type Company struct {
	ID              primitive.ObjectID   `bson:"_id,omitempty"`
	CategoryID      primitive.ObjectID   `bson:"c,omitempty"`
	TechnologyIDs   []primitive.ObjectID `bson:"ti,omitempty"`
	DNSIDs          []primitive.ObjectID `bson:"dn,omitempty"`
	URL             string               `bson:"u,omitempty"`
	Slug            string               `bson:"s,omitempty"`
	Title           string               `bson:"t,omitempty"`
	Email           string               `bson:"e,omitempty"`
	Description     string               `bson:"d,omitempty"`
	Phone           int                  `bson:"p,omitempty"`
	INN             int                  `bson:"i,omitempty"`
	KPP             int                  `bson:"k,omitempty"`
	OGRN            int                  `bson:"og,omitempty"`
	Domain          *domain              `bson:"do,omitempty"`
	Avatar          Link                 `bson:"a,omitempty"`
	Location        *location            `bson:"l,omitempty"`
	App             *app                 `bson:"ap,omitempty"`
	Social          *social              `bson:"so,omitempty"`
	People          []*peopleItem        `bson:"pe,omitempty"`
	UpdatedAt       time.Time            `bson:"ua,omitempty"`
	PageSpeed       uint32               `bson:"ps,omitempty"` // milliseconds
	Verified        bool                 `bson:"v,omitempty"`
	Premium         bool                 `bson:"pr,omitempty"`
	PremiumDeadline time.Time            `bson:"pd,omitempty"`
	Hash            string               `bson:"has,omitempty"`
	Online          bool                 `bson:"o,omitempty"`
	Hidden          bool                 `bson:"h,omitempty"`
}

func (*Company) DigVk

func (c *Company) DigVk(ctx context.Context, vkUrl string)

func (*Company) GetSocial

func (c *Company) GetSocial() *social

func (*Company) UpdateOrCreate

func (c *Company) UpdateOrCreate(ctx context.Context, rawURL, registrar string, registrationDate time.Time, async bool)

func (*Company) WithHash

func (c *Company) WithHash()
type Link = string

Link direct .jpg url

func GetAvatar

func GetAvatar(ctx context.Context, companyID primitive.ObjectID) (Link, error)

Jump to

Keyboard shortcuts

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