package requestmodel import ( amqp "github.com/rabbitmq/amqp091-go" ) // <----------- Header Argument ----------> type HeaderArg string const ( Command HeaderArg = "command" ) func (h HeaderArg) String() string { return string(h) } // <----------- Header Value -----------> type HeaderValue interface { String() string } // <----------- Command -----------> type CommandType string var _ HeaderValue = (*CommandType)(nil) const ( GetCompanyDataAgent CommandType = "GetCompanyData" GetCompaniesUidAgent CommandType = "GetCompaniesUid" SetCompanyDataAgent CommandType = "SetCompanyData" GetVacancyListAgent CommandType = "GetVacancyList" GetSubmissionListAgent CommandType = "GetSubmissionList" DeleteSubmissionAgent CommandType = "DeleteSubmission" GetProfileDataAgent CommandType = "GetProfileData" SetProfileDataAgent CommandType = "SetProfileData" GetBalanceAgent CommandType = "GetBalance" GetTransactionsAgent CommandType = "GetTransactions" CreateTransactionAgent CommandType = "CreateTransaction" GetBankAccountsAgent CommandType = "GetBankAccounts" CreateBankAccountAgent CommandType = "CreateBankAccount" EditBankAccountAgent CommandType = "EditBankAccount" DeleteBankAccountAgent CommandType = "DeleteBankAccount" GetCompanyDataDistributor CommandType = "GetCompanyData" GetCompaniesUidDistributor CommandType = "GetCompaniesUid" SetCompanyDataDistributor CommandType = "SetCompanyData" GetVacancyListDistributor CommandType = "GetVacancyList" CreateVacancyDistributor CommandType = "CreateVacancy" EditVacancyDistributor CommandType = "EditVacancy" DeleteVacancyDistributor CommandType = "DeleteVacancy" SendVacancyToModerationDistributor CommandType = "SendVacancyToModeration" GetSubmissionsForVacancyDistributor CommandType = "GetSubmissionsForVacancy" SetSubmissionStatusDistributor CommandType = "SetSubmissionStatus" GetProfileDataDistributor CommandType = "GetProfileData" SetProfileDataDistributor CommandType = "SetProfileData" GetBalanceDistributor CommandType = "GetBalance" GetCompanyBalanceDistributor CommandType = "GetCompanyBalance" GetTransactionsDistributor CommandType = "GetTransactions" GetCompanyTransactionsDistributor CommandType = "GetCompanyTransactions" CreateTransactionDistributor CommandType = "CreateTransaction" GetBankAccountsDistributor CommandType = "GetBankAccounts" GetCompanyBankAccountsDistributor CommandType = "GetCompanyBankAccounts" CreateBankAccountDistributor CommandType = "CreateBankAccount" EditBankAccountDistributor CommandType = "EditBankAccount" DeleteBankAccountDistributor CommandType = "DeleteBankAccount" ) func (c CommandType) String() string { return string(c) } // <----------- Header -----------> type Header map[HeaderArg]HeaderValue func (h Header) ToTable() amqp.Table { table := amqp.Table{} for k, v := range h { table[k.String()] = v.String() } return table } type CompanyId struct { CompanyId string `json:"company_id"` }