model

package
v0.0.0-...-945c817 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContractStatusDone             = "closed"
	ContractStatusUnderDevelopment = "active"
	ContractStatusDenied           = "denied"
	ContractStatusExpected         = "expected"

	ContractMinGrade = 1
	ContractMaxGrade = 5

	FreelancerReady    = "Ready"
	FreelancerNotReady = "NotReady"
)
View Source
const (
	JobStateOpened  = "opened"
	JobStateFound   = "found"
	JobStateClosed  = "closed"
	JobStateDeleted = "deleted"
)
View Source
const (
	ResponseStatusBlock        = "block"
	ResponseStatusSent         = "SENT"
	ResponseStatusContractSent = "SENT_CONTRACT"
	ResponseStatusCancel       = "CANCEL"
	ResponseStatusReview       = "REVIEW"
	ResponseStatusDenied       = "DENIED"
	ResponseStatusAccepted     = "ACCEPTED"
)
View Source
const (
	UserFreelancer = "freelancer"
	UserCustomer   = "client"
)

Variables

This section is empty.

Functions

func EncryptString

func EncryptString(s string) (string, error)

Types

type BodyPassword

type BodyPassword struct {
	Password                string `json:"password" valid:"required"`
	NewPassword             string `json:"newPassword" valid:"required, length(6|100)"`
	NewPasswordConfirmation string `json:"newPasswordConfirmation" valid:"required"`
}

func (BodyPassword) MarshalEasyJSON

func (v BodyPassword) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (BodyPassword) MarshalJSON

func (v BodyPassword) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*BodyPassword) UnmarshalEasyJSON

func (v *BodyPassword) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*BodyPassword) UnmarshalJSON

func (v *BodyPassword) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Chat

type Chat struct {
	ID         int64  `json:"id"`
	Freelancer int64  `json:"freelancerId"`
	Manager    int64  `json:"managerId"`
	Name       string `json:"name"`
	ProposalId int64  `json:"proposalId"`
	UserId     int64  `json:"userId"`
}

type City

type City struct {
	ID        int64
	CountryID int64
	Name      string
}

func (City) MarshalEasyJSON

func (v City) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (City) MarshalJSON

func (v City) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*City) UnmarshalEasyJSON

func (v *City) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*City) UnmarshalJSON

func (v *City) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Company

type Company struct {
	ID           int64  `json:"id" valid:"int , optional"`
	CompanyName  string `json:"companyName" valid:"utfletternum, required"`
	CompanyOwner string `json:"companyOwner"`
	Site         string `json:"site" valid:"url"`
	TagLine      string `json:"tagline" valid:"- , optional"`
	Description  string `json:"description" valid:"-"`
	Country      int64  `json:"country" valid:"utfletter"`
	City         int64  `json:"city" valid:"utfletter"`
	Address      string `json:"address" valid:"-"`
	Phone        string `json:"phone" valid:"- , optional"`
}

func (Company) MarshalEasyJSON

func (v Company) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Company) MarshalJSON

func (v Company) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Company) Sanitize

func (comp *Company) Sanitize(sanitizer *bluemonday.Policy)

func (*Company) UnmarshalEasyJSON

func (v *Company) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Company) UnmarshalJSON

func (v *Company) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type CompanyOutput

type CompanyOutput struct {
	ID          int64  `json:"id"`
	CompanyName string `json:"companyName"`
	Site        string `json:"site"`
	TagLine     string `json:"tagline"`
	Description string `json:"description"`
	Country     string `json:"country"`
	City        string `json:"city"`
	Address     string `json:"address"`
	Phone       string `json:"phone"`
}

func (CompanyOutput) MarshalEasyJSON

func (v CompanyOutput) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CompanyOutput) MarshalJSON

func (v CompanyOutput) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CompanyOutput) Sanitize

func (comp *CompanyOutput) Sanitize(sanitizer *bluemonday.Policy)

func (*CompanyOutput) UnmarshalEasyJSON

func (v *CompanyOutput) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CompanyOutput) UnmarshalJSON

func (v *CompanyOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Contract

type Contract struct {
	ID                   int64     `json:"id"`
	ResponseID           int64     `json:"responseId"`
	CompanyID            int64     `json:"companyId"`
	FreelancerID         int64     `json:"freelancerId"`
	StartTime            time.Time `json:"startTime"`
	EndTime              time.Time `json:"endTime"`
	Status               string    `json:"status,string"`
	StatusFreelancerWork string    `json:"statusFreelancerWork,string"`
	FreelancerGrade      int       `json:"freelancerGrade"`
	FreelancerComment    string    `json:"freelancerComment,string"`
	ClientGrade          int       `json:"clientGrade"`
	ClientComment        string    `json:"clientComment,string"`
	PaymentAmount        float32   `json:"paymentAmount"`
	TimeEstimation       int       `json:"timeEstimation"`
}

func (Contract) MarshalEasyJSON

func (v Contract) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Contract) MarshalJSON

func (v Contract) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Contract) UnmarshalEasyJSON

func (v *Contract) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Contract) UnmarshalJSON

func (v *Contract) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Contract) Validate

func (c *Contract) Validate(lastId int64) error

type ContractInput

type ContractInput struct {
	PaymentAmount  float32 `json:"paymentAmount, string"`
	TimeEstimation int     `json:"timeEstimation"`
}

func (ContractInput) MarshalEasyJSON

func (v ContractInput) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ContractInput) MarshalJSON

func (v ContractInput) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ContractInput) UnmarshalEasyJSON

func (v *ContractInput) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ContractInput) UnmarshalJSON

func (v *ContractInput) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ContractOutput

type ContractOutput struct {
	Company    company_grpc.CompanyOutput
	Freelancer freelancer_grpc.ExtendedFreelancer
	Job        job_grpc.Job
	Contract   Contract
}

func (ContractOutput) MarshalEasyJSON

func (v ContractOutput) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ContractOutput) MarshalJSON

func (v ContractOutput) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ContractOutput) UnmarshalEasyJSON

func (v *ContractOutput) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ContractOutput) UnmarshalJSON

func (v *ContractOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ContractOutputFreelancer

type ContractOutputFreelancer struct {
	OuFreel    *FreelancerOutput    `json:"freelancer"`
	FirstName  string               `json:"firstName"`
	SecondName string               `json:"secondName"`
	Contracts  *FreelancerContracts `json:"contracts"`
}

func (ContractOutputFreelancer) MarshalEasyJSON

func (v ContractOutputFreelancer) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ContractOutputFreelancer) MarshalJSON

func (v ContractOutputFreelancer) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ContractOutputFreelancer) UnmarshalEasyJSON

func (v *ContractOutputFreelancer) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ContractOutputFreelancer) UnmarshalJSON

func (v *ContractOutputFreelancer) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Country

type Country struct {
	ID   int64
	Name string
}

func (Country) MarshalEasyJSON

func (v Country) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Country) MarshalJSON

func (v Country) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Country) UnmarshalEasyJSON

func (v *Country) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Country) UnmarshalJSON

func (v *Country) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ExtendFreelancer

type ExtendFreelancer struct {
	F          *Freelancer `json:"freelancer"`
	FirstName  string      `json:"firstName"`
	SecondName string      `json:"secondName"`
}

func (ExtendFreelancer) MarshalEasyJSON

func (v ExtendFreelancer) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ExtendFreelancer) MarshalJSON

func (v ExtendFreelancer) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ExtendFreelancer) Sanitize

func (freel *ExtendFreelancer) Sanitize(sanitizer *bluemonday.Policy)

func (*ExtendFreelancer) UnmarshalEasyJSON

func (v *ExtendFreelancer) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ExtendFreelancer) UnmarshalJSON

func (v *ExtendFreelancer) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ExtendResponse

type ExtendResponse struct {
	R          *Response `json:"Response"`
	FirstName  string    `json:"firstName"`
	SecondName string    `json:"lastName"`
	JobTitle   string    `json:"jobTitle, string"`
}

func (ExtendResponse) MarshalEasyJSON

func (v ExtendResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ExtendResponse) MarshalJSON

func (v ExtendResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ExtendResponse) UnmarshalEasyJSON

func (v *ExtendResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ExtendResponse) UnmarshalJSON

func (v *ExtendResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ExtendedOutputFreelancer

type ExtendedOutputFreelancer struct {
	OuFreel    *FreelancerOutput `json:"freelancer"`
	FirstName  string            `json:"firstName"`
	SecondName string            `json:"secondName"`
}

func (ExtendedOutputFreelancer) MarshalEasyJSON

func (v ExtendedOutputFreelancer) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ExtendedOutputFreelancer) MarshalJSON

func (v ExtendedOutputFreelancer) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ExtendedOutputFreelancer) UnmarshalEasyJSON

func (v *ExtendedOutputFreelancer) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ExtendedOutputFreelancer) UnmarshalJSON

func (v *ExtendedOutputFreelancer) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Freelancer

type Freelancer struct {
	ID                int64  `json:"id" valid:"int, optional"`
	AccountId         int64  `json:"accountId" valid:"int, optional"`
	Country           int64  `json:"country" valid:"utfletter"`
	City              int64  `json:"city" valid:"utfletter"`
	Address           string `json:"address" valid:"-"`
	Phone             string `json:"phone" valid:"-"`
	TagLine           string `json:"tagline" valid:"-"`
	Overview          string `json:"overview" valid:"-"`
	ExperienceLevelId int64  `json:"experienceLevelId" valid:"in(1|2|3)"`
	SpecialityId      int64  `json:"specialityId,string" valid:"int"`
	Avatar            string `json:"avatar"`
}

func (Freelancer) MarshalEasyJSON

func (v Freelancer) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Freelancer) MarshalJSON

func (v Freelancer) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Freelancer) Sanitize

func (freel *Freelancer) Sanitize(sanitizer *bluemonday.Policy)

func (*Freelancer) UnmarshalEasyJSON

func (v *Freelancer) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Freelancer) UnmarshalJSON

func (v *Freelancer) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type FreelancerContracts

type FreelancerContracts struct {
	ActiveContracts  int64 `json:"active"`
	SuccessContracts int64 `json:"success"`
}

func (FreelancerContracts) MarshalEasyJSON

func (v FreelancerContracts) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (FreelancerContracts) MarshalJSON

func (v FreelancerContracts) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*FreelancerContracts) UnmarshalEasyJSON

func (v *FreelancerContracts) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*FreelancerContracts) UnmarshalJSON

func (v *FreelancerContracts) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type FreelancerOutput

type FreelancerOutput struct {
	ID                int64  `json:"id" valid:"int, optional"`
	AccountId         int64  `json:"accountId" valid:"int, optional"`
	Country           string `json:"country" valid:"utfletter"`
	City              string `json:"city" valid:"utfletter"`
	Address           string `json:"address" valid:"-"`
	Phone             string `json:"phone" valid:"-"`
	TagLine           string `json:"tagline" valid:"-"`
	Overview          string `json:"overview" valid:"-"`
	ExperienceLevelId int64  `json:"experienceLevelId" valid:"in(1|2|3)"`
	SpecialityId      int64  `json:"specialityId,string" valid:"int"`
	Avatar            string `json:"avatar"`
}

func (FreelancerOutput) MarshalEasyJSON

func (v FreelancerOutput) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (FreelancerOutput) MarshalJSON

func (v FreelancerOutput) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*FreelancerOutput) Sanitize

func (freel *FreelancerOutput) Sanitize(sanitizer *bluemonday.Policy)

func (*FreelancerOutput) UnmarshalEasyJSON

func (v *FreelancerOutput) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*FreelancerOutput) UnmarshalJSON

func (v *FreelancerOutput) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type HireManager

type HireManager struct {
	ID        int64  `json:"id" valid:"int, optional"`
	AccountID int64  `json:"accountId" valid:"int, optional"`
	Location  string `json:"location" valid:"-"`
	CompanyID int64  `json:"companyId" valid:"int, optional"`
}

func (HireManager) MarshalEasyJSON

func (v HireManager) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (HireManager) MarshalJSON

func (v HireManager) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*HireManager) Sanitize

func (hireMan *HireManager) Sanitize(sanitizer *bluemonday.Policy)

func (*HireManager) UnmarshalEasyJSON

func (v *HireManager) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*HireManager) UnmarshalJSON

func (v *HireManager) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type HttpError

type HttpError struct {
	ClientErr error
	LogErr    error
	HttpCode  int
}

type InnerInfo

type InnerInfo struct {
	UserID          int64  `json:"user_id"`
	WhoSeeProfile   string `json:"who_see_profile"`
	ControlQuestion string `json:"control_question"`
	ControlAnswer   string `json:"-"`
}

func (InnerInfo) MarshalEasyJSON

func (v InnerInfo) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (InnerInfo) MarshalJSON

func (v InnerInfo) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*InnerInfo) UnmarshalEasyJSON

func (v *InnerInfo) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*InnerInfo) UnmarshalJSON

func (v *InnerInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Job

type Job struct {
	ID                int64     `json:"id" valid:"int, optional"`
	HireManagerId     int64     `json:"hireManagerId,string" valid:"int, optional"`
	Title             string    `json:"title" valid:"utfletternum, required"`
	Description       string    `json:"description"valid:"- , optional"`
	Files             string    `json:"files" valid:"-"`
	SpecialityId      int64     `json:"specialityId,string" valid:"int, optional"`
	ExperienceLevelId int64     `json:"experienceLevelId,string" valid:"in(1|2|3)"`
	PaymentAmount     float32   `json:"paymentAmount,string" valid:"float"`
	Country           int64     `json:"country" valid:"utfletternum, optional"`
	City              int64     `json:"city" valid:"utfletternum, optional"`
	JobTypeId         int64     `json:"jobTypeId,string" valid:"int, optional"`
	Date              time.Time `json:"date"`
	Status            string    `json:"status,string"`
	TagLine           string    `json:"tagLine"`
	Proposals         int64     `json:"proposals"`
}

func (*Job) BeforeCreate

func (j *Job) BeforeCreate()

func (*Job) IsEqual

func (j *Job) IsEqual(job Job) bool

func (Job) MarshalEasyJSON

func (v Job) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Job) MarshalJSON

func (v Job) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Job) Sanitize

func (j *Job) Sanitize(sanitizer *bluemonday.Policy)

func (*Job) UnmarshalEasyJSON

func (v *Job) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Job) UnmarshalJSON

func (v *Job) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Message

type Message struct {
	ID         int64     `json:"id"`
	ChatID     int64     `json:"chatId"`
	SenderID   int64     `json:"senderId"`
	ReceiverID int64     `json:"receiverId"`
	Body       string    `json:"body"`
	Date       time.Time `json:"date"`
	IsRead     bool      `json:"isRead"`
	ProposalId int64     `json:"proposalId"`
}

type Notification

type Notification struct {
	UserID          int64 `json:"-"`
	NewMessages     bool  `json:"new_messages"`
	NewProjects     bool  `json:"new_projects"`
	NewsFromService bool  `json:"news_service"`
}

func (Notification) MarshalEasyJSON

func (v Notification) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Notification) MarshalJSON

func (v Notification) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Notification) UnmarshalEasyJSON

func (v *Notification) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Notification) UnmarshalJSON

func (v *Notification) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type OutputResponse

type OutputResponse struct {
	Id int64 `json:"id"`
}

what for

func (OutputResponse) MarshalEasyJSON

func (v OutputResponse) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (OutputResponse) MarshalJSON

func (v OutputResponse) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*OutputResponse) UnmarshalEasyJSON

func (v *OutputResponse) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*OutputResponse) UnmarshalJSON

func (v *OutputResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Packet

type Packet struct {
	Transaction string  `json:"transaction"`
	Message     Message `json:"message"`
	Chat        Chat    `json:"chat"`
	Client      bool    `json:"isClient,string"`
}

type PublicContractVersion

type PublicContractVersion struct {
	FirstName         string `json:"firstName"`
	SecondName        string `json:"secondName"`
	JobTitle          string `json:"jobTitle"`
	CompanyName       string `json:"companyName"`
	FreelancerGrade   int    `json:"freelancerGrade"`
	FreelancerComment string `json:"freelancerComment"`
	ClientGrade       int    `json:"clientGrade"`
	ClientComment     string `json:"clientComment"`
	Status            string `json:"status"`
}

func (PublicContractVersion) MarshalEasyJSON

func (v PublicContractVersion) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (PublicContractVersion) MarshalJSON

func (v PublicContractVersion) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*PublicContractVersion) Sanitize

func (pbc *PublicContractVersion) Sanitize(sanitizer *bluemonday.Policy)

func (*PublicContractVersion) UnmarshalEasyJSON

func (v *PublicContractVersion) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PublicContractVersion) UnmarshalJSON

func (v *PublicContractVersion) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Response

type Response struct {
	ID               int64     `json:"id"`
	FreelancerId     int64     `json:"freelancerId"`
	JobId            int64     `json:"jobId"`
	Files            string    `json:"files,string"`
	Date             time.Time `json:"date"`
	StatusManager    string    `json:"statusManager,string"`
	StatusFreelancer string    `json:"statusFreelancer,string"`
	PaymentAmount    float32   `json:"paymentAmount,string"`
	CoverLetter      string    `json:"coverLetter,string"`
	TimeEstimation   int       `json:"timeEstimation"`
}

func (*Response) BeforeCreate

func (r *Response) BeforeCreate()

func (*Response) IsEqual

func (r *Response) IsEqual(response *Response) bool

func (Response) MarshalEasyJSON

func (v Response) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Response) MarshalJSON

func (v Response) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Response) Sanitize

func (r *Response) Sanitize(sanitizer *bluemonday.Policy)

func (*Response) UnmarshalEasyJSON

func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Response) UnmarshalJSON

func (v *Response) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*Response) Validate

func (r *Response) Validate(lastID int64) error

validation before create and edit for create lastID = 0

type ResponseOutputWithFreel

type ResponseOutputWithFreel struct {
	Job        Job
	Response   Response
	Freelancer ExtendFreelancer
}

func (ResponseOutputWithFreel) MarshalEasyJSON

func (v ResponseOutputWithFreel) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ResponseOutputWithFreel) MarshalJSON

func (v ResponseOutputWithFreel) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ResponseOutputWithFreel) Sanitize

func (r *ResponseOutputWithFreel) Sanitize(sanitizer *bluemonday.Policy)

func (*ResponseOutputWithFreel) UnmarshalEasyJSON

func (v *ResponseOutputWithFreel) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ResponseOutputWithFreel) UnmarshalJSON

func (v *ResponseOutputWithFreel) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Review

type Review struct {
	CompanyName   string `json:"companyName"`
	JobTitle      string `json:"jobTitle"`
	ClientGrade   int    `json:"clientGrade"`
	ClientComment string `json:"clientComment"`
}

func (Review) MarshalEasyJSON

func (v Review) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Review) MarshalJSON

func (v Review) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Review) UnmarshalEasyJSON

func (v *Review) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Review) UnmarshalJSON

func (v *Review) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ReviewInput

type ReviewInput struct {
	Grade   int    `json:"grade"`
	Comment string `json:"comment"`
}

func (ReviewInput) MarshalEasyJSON

func (v ReviewInput) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ReviewInput) MarshalJSON

func (v ReviewInput) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ReviewInput) UnmarshalEasyJSON

func (v *ReviewInput) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ReviewInput) UnmarshalJSON

func (v *ReviewInput) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Role

type Role struct {
	Role   string `json:"role"`
	Label  string `json:"label"`
	Avatar string `json:"avatar"`
}

func (Role) MarshalEasyJSON

func (v Role) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Role) MarshalJSON

func (v Role) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Role) UnmarshalEasyJSON

func (v *Role) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Role) UnmarshalJSON

func (v *Role) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SearchParams

type SearchParams struct {
	MinGrade         int64   `json:"minGrade"`
	MaxGrade         int64   `json:"maxGrade"`
	MinPaymentAmount float64 `json:"minPaymentAmount"`
	MaxPaymentAmount float64 `json:"maxPaymentAmount"`
	Country          int64   `json:"country"`
	City             int64   `json:"city"`
	MinProposals     int64   `json:"minProposalCount"`
	MaxProposals     int64   `json:"maxProposalCount"`
	ExperienceLevel  [3]bool `json:"experienceLevel"`
	Desc             bool    `json:"desc"`
	JobType          int64   `json:"jobTypeId"`
	Limit            int64   `json:"limit"`
	SpecialityId     int64   `json:"specialityId"`
}

func (SearchParams) MarshalEasyJSON

func (v SearchParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SearchParams) MarshalJSON

func (v SearchParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SearchParams) UnmarshalEasyJSON

func (v *SearchParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SearchParams) UnmarshalJSON

func (v *SearchParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type User

type User struct {
	ID               int64     `json:"-" valid:"int, optional"`
	FirstName        string    `json:"firstName" valid:"utfletter, required"`
	SecondName       string    `json:"secondName" valid:"utfletter"`
	UserName         string    `json:"username" valid:"alphanum"`
	Email            string    `json:"email" valid:"email"`
	Password         string    `json:"password" valid:"length(6|100)"`
	EncryptPassword  string    `json:"-" valid:"-"`
	Avatar           []byte    `json:"-" valid:"-"`
	UserType         string    `json:"type" valid:"in(client|freelancer)"`
	RegistrationDate time.Time `json:"registrationDate" valid:"-"`
	FreelancerId     int64     `json:"freelancerId" valid:"int, optional"`
	HireManagerId    int64     `json:"hireManagerId" valid:"int, optional"`
	CompanyId        int64     `json:"companyId" valid:"int, optional"`
}

func (*User) BeforeCreate

func (u *User) BeforeCreate() error

func (*User) ComparePassword

func (u *User) ComparePassword(password string) bool

func (*User) IsManager

func (u *User) IsManager() bool

func (User) MarshalEasyJSON

func (v User) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (User) MarshalJSON

func (v User) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*User) Sanitize

func (u *User) Sanitize(sanitizer *bluemonday.Policy)

func (*User) SetUserType

func (u *User) SetUserType(userType string) error

func (*User) UnmarshalEasyJSON

func (v *User) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*User) UnmarshalJSON

func (v *User) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (*User) Validate

func (u *User) Validate() error

Jump to

Keyboard shortcuts

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