goautowp

package module
Version: v0.0.0-...-66e74d8 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2021 License: MIT Imports: 55 Imported by: 0

README

Build Status Quality Gate Status

Documentation

Index

Constants

View Source
const KeyCloakExternalAccountID = "keycloak"

Variables

View Source
var (
	CommentVote_VoteValue_name = map[int32]string{
		0:  "UNKNOWN",
		-1: "POSITIVE",
		1:  "NEGATIVE",
	}
	CommentVote_VoteValue_value = map[string]int32{
		"UNKNOWN":  0,
		"POSITIVE": -1,
		"NEGATIVE": 1,
	}
)

Enum value maps for CommentVote_VoteValue.

View Source
var AutobanProfiles = []AutobanProfile{
	{
		Limit:  10000,
		Reason: "daily limit",
		Group:  []string{},
		Time:   time.Hour * 10 * 24,
	},
	{
		Limit:  3600,
		Reason: "hourly limit",
		Group:  []string{"hour"},
		Time:   time.Hour * 5 * 24,
	},
	{
		Limit:  1200,
		Reason: "ten min limit",
		Group:  []string{"hour", "tenminute"},
		Time:   time.Hour * 24,
	},
	{
		Limit:  700,
		Reason: "min limit",
		Group:  []string{"hour", "tenminute", "minute"},
		Time:   time.Hour * 12,
	},
}

AutobanProfiles AutobanProfiles

View Source
var Autowp_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "goautowp.Autowp",
	HandlerType: (*AutowpServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AclEnforce",
			Handler:    _Autowp_AclEnforce_Handler,
		},
		{
			MethodName: "AddToTrafficBlacklist",
			Handler:    _Autowp_AddToTrafficBlacklist_Handler,
		},
		{
			MethodName: "AddToTrafficWhitelist",
			Handler:    _Autowp_AddToTrafficWhitelist_Handler,
		},
		{
			MethodName: "CreateContact",
			Handler:    _Autowp_CreateContact_Handler,
		},
		{
			MethodName: "CreateFeedback",
			Handler:    _Autowp_CreateFeedback_Handler,
		},
		{
			MethodName: "DeleteContact",
			Handler:    _Autowp_DeleteContact_Handler,
		},
		{
			MethodName: "DeleteFromTrafficBlacklist",
			Handler:    _Autowp_DeleteFromTrafficBlacklist_Handler,
		},
		{
			MethodName: "DeleteFromTrafficWhitelist",
			Handler:    _Autowp_DeleteFromTrafficWhitelist_Handler,
		},
		{
			MethodName: "GetBrandIcons",
			Handler:    _Autowp_GetBrandIcons_Handler,
		},
		{
			MethodName: "GetBrandVehicleTypes",
			Handler:    _Autowp_GetBrandVehicleTypes_Handler,
		},
		{
			MethodName: "GetCommentVotes",
			Handler:    _Autowp_GetCommentVotes_Handler,
		},
		{
			MethodName: "GetContact",
			Handler:    _Autowp_GetContact_Handler,
		},
		{
			MethodName: "GetContacts",
			Handler:    _Autowp_GetContacts_Handler,
		},
		{
			MethodName: "GetForumsUserSummary",
			Handler:    _Autowp_GetForumsUserSummary_Handler,
		},
		{
			MethodName: "GetIP",
			Handler:    _Autowp_GetIP_Handler,
		},
		{
			MethodName: "GetMessagesNewCount",
			Handler:    _Autowp_GetMessagesNewCount_Handler,
		},
		{
			MethodName: "GetMessagesSummary",
			Handler:    _Autowp_GetMessagesSummary_Handler,
		},
		{
			MethodName: "GetPerspectives",
			Handler:    _Autowp_GetPerspectives_Handler,
		},
		{
			MethodName: "GetPerspectivePages",
			Handler:    _Autowp_GetPerspectivePages_Handler,
		},
		{
			MethodName: "GetReCaptchaConfig",
			Handler:    _Autowp_GetReCaptchaConfig_Handler,
		},
		{
			MethodName: "GetSpecs",
			Handler:    _Autowp_GetSpecs_Handler,
		},
		{
			MethodName: "GetTrafficTop",
			Handler:    _Autowp_GetTrafficTop_Handler,
		},
		{
			MethodName: "GetTrafficWhitelist",
			Handler:    _Autowp_GetTrafficWhitelist_Handler,
		},
		{
			MethodName: "GetVehicleTypes",
			Handler:    _Autowp_GetVehicleTypes_Handler,
		},
		{
			MethodName: "CreateUser",
			Handler:    _Autowp_CreateUser_Handler,
		},
		{
			MethodName: "PasswordRecovery",
			Handler:    _Autowp_PasswordRecovery_Handler,
		},
		{
			MethodName: "PasswordRecoveryCheckCode",
			Handler:    _Autowp_PasswordRecoveryCheckCode_Handler,
		},
		{
			MethodName: "PasswordRecoveryConfirm",
			Handler:    _Autowp_PasswordRecoveryConfirm_Handler,
		},
		{
			MethodName: "EmailChangeConfirm",
			Handler:    _Autowp_EmailChangeConfirm_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "spec.proto",
}

Autowp_ServiceDesc is the grpc.ServiceDesc for Autowp service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RandStringBytesRmndr

func RandStringBytesRmndr(n int) string

func RegisterAutowpServer

func RegisterAutowpServer(s grpc.ServiceRegistrar, srv AutowpServer)

func ValidateConfig

func ValidateConfig(config Config)

ValidateConfig ValidateConfig

Types

type APIBanItem

type APIBanItem struct {
	Until    *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=until,proto3" json:"until,omitempty"`
	ByUserId int32                  `protobuf:"varint,2,opt,name=by_user_id,json=byUserId,proto3" json:"by_user_id,omitempty"`
	ByUser   *User                  `protobuf:"bytes,3,opt,name=by_user,json=byUser,proto3" json:"by_user,omitempty"`
	Reason   string                 `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*APIBanItem) Descriptor deprecated

func (*APIBanItem) Descriptor() ([]byte, []int)

Deprecated: Use APIBanItem.ProtoReflect.Descriptor instead.

func (*APIBanItem) GetByUser

func (x *APIBanItem) GetByUser() *User

func (*APIBanItem) GetByUserId

func (x *APIBanItem) GetByUserId() int32

func (*APIBanItem) GetReason

func (x *APIBanItem) GetReason() string

func (*APIBanItem) GetUntil

func (x *APIBanItem) GetUntil() *timestamppb.Timestamp

func (*APIBanItem) ProtoMessage

func (*APIBanItem) ProtoMessage()

func (*APIBanItem) ProtoReflect

func (x *APIBanItem) ProtoReflect() protoreflect.Message

func (*APIBanItem) Reset

func (x *APIBanItem) Reset()

func (*APIBanItem) String

func (x *APIBanItem) String() string

type APICreateFeedbackRequest

type APICreateFeedbackRequest struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Email   string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Captcha string `protobuf:"bytes,4,opt,name=captcha,proto3" json:"captcha,omitempty"`
	// contains filtered or unexported fields
}

func (*APICreateFeedbackRequest) Descriptor deprecated

func (*APICreateFeedbackRequest) Descriptor() ([]byte, []int)

Deprecated: Use APICreateFeedbackRequest.ProtoReflect.Descriptor instead.

func (*APICreateFeedbackRequest) GetCaptcha

func (x *APICreateFeedbackRequest) GetCaptcha() string

func (*APICreateFeedbackRequest) GetEmail

func (x *APICreateFeedbackRequest) GetEmail() string

func (*APICreateFeedbackRequest) GetMessage

func (x *APICreateFeedbackRequest) GetMessage() string

func (*APICreateFeedbackRequest) GetName

func (x *APICreateFeedbackRequest) GetName() string

func (*APICreateFeedbackRequest) ProtoMessage

func (*APICreateFeedbackRequest) ProtoMessage()

func (*APICreateFeedbackRequest) ProtoReflect

func (x *APICreateFeedbackRequest) ProtoReflect() protoreflect.Message

func (*APICreateFeedbackRequest) Reset

func (x *APICreateFeedbackRequest) Reset()

func (*APICreateFeedbackRequest) String

func (x *APICreateFeedbackRequest) String() string

type APICreateUserRequest

type APICreateUserRequest struct {
	Email           string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Name            string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Password        string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	PasswordConfirm string `protobuf:"bytes,4,opt,name=password_confirm,json=passwordConfirm,proto3" json:"password_confirm,omitempty"`
	Language        string `protobuf:"bytes,5,opt,name=language,proto3" json:"language,omitempty"`
	Captcha         string `protobuf:"bytes,6,opt,name=captcha,proto3" json:"captcha,omitempty"`
	// contains filtered or unexported fields
}

func (*APICreateUserRequest) Descriptor deprecated

func (*APICreateUserRequest) Descriptor() ([]byte, []int)

Deprecated: Use APICreateUserRequest.ProtoReflect.Descriptor instead.

func (*APICreateUserRequest) GetCaptcha

func (x *APICreateUserRequest) GetCaptcha() string

func (*APICreateUserRequest) GetEmail

func (x *APICreateUserRequest) GetEmail() string

func (*APICreateUserRequest) GetLanguage

func (x *APICreateUserRequest) GetLanguage() string

func (*APICreateUserRequest) GetName

func (x *APICreateUserRequest) GetName() string

func (*APICreateUserRequest) GetPassword

func (x *APICreateUserRequest) GetPassword() string

func (*APICreateUserRequest) GetPasswordConfirm

func (x *APICreateUserRequest) GetPasswordConfirm() string

func (*APICreateUserRequest) ProtoMessage

func (*APICreateUserRequest) ProtoMessage()

func (*APICreateUserRequest) ProtoReflect

func (x *APICreateUserRequest) ProtoReflect() protoreflect.Message

func (*APICreateUserRequest) Reset

func (x *APICreateUserRequest) Reset()

func (*APICreateUserRequest) String

func (x *APICreateUserRequest) String() string

type APIEmailChangeConfirmRequest

type APIEmailChangeConfirmRequest struct {
	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*APIEmailChangeConfirmRequest) Descriptor deprecated

func (*APIEmailChangeConfirmRequest) Descriptor() ([]byte, []int)

Deprecated: Use APIEmailChangeConfirmRequest.ProtoReflect.Descriptor instead.

func (*APIEmailChangeConfirmRequest) GetCode

func (x *APIEmailChangeConfirmRequest) GetCode() string

func (*APIEmailChangeConfirmRequest) ProtoMessage

func (*APIEmailChangeConfirmRequest) ProtoMessage()

func (*APIEmailChangeConfirmRequest) ProtoReflect

func (*APIEmailChangeConfirmRequest) Reset

func (x *APIEmailChangeConfirmRequest) Reset()

func (*APIEmailChangeConfirmRequest) String

type APIForumsUserSummary

type APIForumsUserSummary struct {
	SubscriptionsCount int32 `protobuf:"varint,1,opt,name=subscriptionsCount,proto3" json:"subscriptionsCount,omitempty"`
	// contains filtered or unexported fields
}

func (*APIForumsUserSummary) Descriptor deprecated

func (*APIForumsUserSummary) Descriptor() ([]byte, []int)

Deprecated: Use APIForumsUserSummary.ProtoReflect.Descriptor instead.

func (*APIForumsUserSummary) GetSubscriptionsCount

func (x *APIForumsUserSummary) GetSubscriptionsCount() int32

func (*APIForumsUserSummary) ProtoMessage

func (*APIForumsUserSummary) ProtoMessage()

func (*APIForumsUserSummary) ProtoReflect

func (x *APIForumsUserSummary) ProtoReflect() protoreflect.Message

func (*APIForumsUserSummary) Reset

func (x *APIForumsUserSummary) Reset()

func (*APIForumsUserSummary) String

func (x *APIForumsUserSummary) String() string

type APIGetIPRequest

type APIGetIPRequest struct {
	Ip     string   `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

func (*APIGetIPRequest) Descriptor deprecated

func (*APIGetIPRequest) Descriptor() ([]byte, []int)

Deprecated: Use APIGetIPRequest.ProtoReflect.Descriptor instead.

func (*APIGetIPRequest) GetFields

func (x *APIGetIPRequest) GetFields() []string

func (*APIGetIPRequest) GetIp

func (x *APIGetIPRequest) GetIp() string

func (*APIGetIPRequest) ProtoMessage

func (*APIGetIPRequest) ProtoMessage()

func (*APIGetIPRequest) ProtoReflect

func (x *APIGetIPRequest) ProtoReflect() protoreflect.Message

func (*APIGetIPRequest) Reset

func (x *APIGetIPRequest) Reset()

func (*APIGetIPRequest) String

func (x *APIGetIPRequest) String() string

type APIIP

type APIIP struct {
	Address   string       `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Hostname  string       `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
	Blacklist *APIBanItem  `protobuf:"bytes,3,opt,name=blacklist,proto3" json:"blacklist,omitempty"`
	Rights    *APIIPRights `protobuf:"bytes,4,opt,name=rights,proto3" json:"rights,omitempty"`
	// contains filtered or unexported fields
}

func (*APIIP) Descriptor deprecated

func (*APIIP) Descriptor() ([]byte, []int)

Deprecated: Use APIIP.ProtoReflect.Descriptor instead.

func (*APIIP) GetAddress

func (x *APIIP) GetAddress() string

func (*APIIP) GetBlacklist

func (x *APIIP) GetBlacklist() *APIBanItem

func (*APIIP) GetHostname

func (x *APIIP) GetHostname() string

func (*APIIP) GetRights

func (x *APIIP) GetRights() *APIIPRights

func (*APIIP) ProtoMessage

func (*APIIP) ProtoMessage()

func (*APIIP) ProtoReflect

func (x *APIIP) ProtoReflect() protoreflect.Message

func (*APIIP) Reset

func (x *APIIP) Reset()

func (*APIIP) String

func (x *APIIP) String() string

type APIIPRights

type APIIPRights struct {
	AddToBlacklist      bool `protobuf:"varint,1,opt,name=add_to_blacklist,json=addToBlacklist,proto3" json:"add_to_blacklist,omitempty"`
	RemoveFromBlacklist bool `protobuf:"varint,2,opt,name=remove_from_blacklist,json=removeFromBlacklist,proto3" json:"remove_from_blacklist,omitempty"`
	// contains filtered or unexported fields
}

func (*APIIPRights) Descriptor deprecated

func (*APIIPRights) Descriptor() ([]byte, []int)

Deprecated: Use APIIPRights.ProtoReflect.Descriptor instead.

func (*APIIPRights) GetAddToBlacklist

func (x *APIIPRights) GetAddToBlacklist() bool

func (*APIIPRights) GetRemoveFromBlacklist

func (x *APIIPRights) GetRemoveFromBlacklist() bool

func (*APIIPRights) ProtoMessage

func (*APIIPRights) ProtoMessage()

func (*APIIPRights) ProtoReflect

func (x *APIIPRights) ProtoReflect() protoreflect.Message

func (*APIIPRights) Reset

func (x *APIIPRights) Reset()

func (*APIIPRights) String

func (x *APIIPRights) String() string

type APIMessageNewCount

type APIMessageNewCount struct {
	Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

func (*APIMessageNewCount) Descriptor deprecated

func (*APIMessageNewCount) Descriptor() ([]byte, []int)

Deprecated: Use APIMessageNewCount.ProtoReflect.Descriptor instead.

func (*APIMessageNewCount) GetCount

func (x *APIMessageNewCount) GetCount() int32

func (*APIMessageNewCount) ProtoMessage

func (*APIMessageNewCount) ProtoMessage()

func (*APIMessageNewCount) ProtoReflect

func (x *APIMessageNewCount) ProtoReflect() protoreflect.Message

func (*APIMessageNewCount) Reset

func (x *APIMessageNewCount) Reset()

func (*APIMessageNewCount) String

func (x *APIMessageNewCount) String() string

type APIMessageSummary

type APIMessageSummary struct {
	InboxCount     int32 `protobuf:"varint,1,opt,name=inbox_count,json=inboxCount,proto3" json:"inbox_count,omitempty"`
	InboxNewCount  int32 `protobuf:"varint,2,opt,name=inbox_new_count,json=inboxNewCount,proto3" json:"inbox_new_count,omitempty"`
	SentCount      int32 `protobuf:"varint,3,opt,name=sent_count,json=sentCount,proto3" json:"sent_count,omitempty"`
	SystemCount    int32 `protobuf:"varint,4,opt,name=system_count,json=systemCount,proto3" json:"system_count,omitempty"`
	SystemNewCount int32 `protobuf:"varint,5,opt,name=system_new_count,json=systemNewCount,proto3" json:"system_new_count,omitempty"`
	// contains filtered or unexported fields
}

func (*APIMessageSummary) Descriptor deprecated

func (*APIMessageSummary) Descriptor() ([]byte, []int)

Deprecated: Use APIMessageSummary.ProtoReflect.Descriptor instead.

func (*APIMessageSummary) GetInboxCount

func (x *APIMessageSummary) GetInboxCount() int32

func (*APIMessageSummary) GetInboxNewCount

func (x *APIMessageSummary) GetInboxNewCount() int32

func (*APIMessageSummary) GetSentCount

func (x *APIMessageSummary) GetSentCount() int32

func (*APIMessageSummary) GetSystemCount

func (x *APIMessageSummary) GetSystemCount() int32

func (*APIMessageSummary) GetSystemNewCount

func (x *APIMessageSummary) GetSystemNewCount() int32

func (*APIMessageSummary) ProtoMessage

func (*APIMessageSummary) ProtoMessage()

func (*APIMessageSummary) ProtoReflect

func (x *APIMessageSummary) ProtoReflect() protoreflect.Message

func (*APIMessageSummary) Reset

func (x *APIMessageSummary) Reset()

func (*APIMessageSummary) String

func (x *APIMessageSummary) String() string

type APIPasswordRecoveryCheckCodeRequest

type APIPasswordRecoveryCheckCodeRequest struct {
	Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*APIPasswordRecoveryCheckCodeRequest) Descriptor deprecated

func (*APIPasswordRecoveryCheckCodeRequest) Descriptor() ([]byte, []int)

Deprecated: Use APIPasswordRecoveryCheckCodeRequest.ProtoReflect.Descriptor instead.

func (*APIPasswordRecoveryCheckCodeRequest) GetCode

func (*APIPasswordRecoveryCheckCodeRequest) ProtoMessage

func (*APIPasswordRecoveryCheckCodeRequest) ProtoMessage()

func (*APIPasswordRecoveryCheckCodeRequest) ProtoReflect

func (*APIPasswordRecoveryCheckCodeRequest) Reset

func (*APIPasswordRecoveryCheckCodeRequest) String

type APIPasswordRecoveryConfirmRequest

type APIPasswordRecoveryConfirmRequest struct {
	Code            string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
	Password        string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	PasswordConfirm string `protobuf:"bytes,3,opt,name=password_confirm,json=passwordConfirm,proto3" json:"password_confirm,omitempty"`
	// contains filtered or unexported fields
}

func (*APIPasswordRecoveryConfirmRequest) Descriptor deprecated

func (*APIPasswordRecoveryConfirmRequest) Descriptor() ([]byte, []int)

Deprecated: Use APIPasswordRecoveryConfirmRequest.ProtoReflect.Descriptor instead.

func (*APIPasswordRecoveryConfirmRequest) GetCode

func (*APIPasswordRecoveryConfirmRequest) GetPassword

func (x *APIPasswordRecoveryConfirmRequest) GetPassword() string

func (*APIPasswordRecoveryConfirmRequest) GetPasswordConfirm

func (x *APIPasswordRecoveryConfirmRequest) GetPasswordConfirm() string

func (*APIPasswordRecoveryConfirmRequest) ProtoMessage

func (*APIPasswordRecoveryConfirmRequest) ProtoMessage()

func (*APIPasswordRecoveryConfirmRequest) ProtoReflect

func (*APIPasswordRecoveryConfirmRequest) Reset

func (*APIPasswordRecoveryConfirmRequest) String

type APIPasswordRecoveryConfirmResponse

type APIPasswordRecoveryConfirmResponse struct {
	Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
	// contains filtered or unexported fields
}

func (*APIPasswordRecoveryConfirmResponse) Descriptor deprecated

func (*APIPasswordRecoveryConfirmResponse) Descriptor() ([]byte, []int)

Deprecated: Use APIPasswordRecoveryConfirmResponse.ProtoReflect.Descriptor instead.

func (*APIPasswordRecoveryConfirmResponse) GetLogin

func (*APIPasswordRecoveryConfirmResponse) ProtoMessage

func (*APIPasswordRecoveryConfirmResponse) ProtoMessage()

func (*APIPasswordRecoveryConfirmResponse) ProtoReflect

func (*APIPasswordRecoveryConfirmResponse) Reset

func (*APIPasswordRecoveryConfirmResponse) String

type APIPasswordRecoveryRequest

type APIPasswordRecoveryRequest struct {
	Email   string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	Captcha string `protobuf:"bytes,2,opt,name=captcha,proto3" json:"captcha,omitempty"`
	// contains filtered or unexported fields
}

func (*APIPasswordRecoveryRequest) Descriptor deprecated

func (*APIPasswordRecoveryRequest) Descriptor() ([]byte, []int)

Deprecated: Use APIPasswordRecoveryRequest.ProtoReflect.Descriptor instead.

func (*APIPasswordRecoveryRequest) GetCaptcha

func (x *APIPasswordRecoveryRequest) GetCaptcha() string

func (*APIPasswordRecoveryRequest) GetEmail

func (x *APIPasswordRecoveryRequest) GetEmail() string

func (*APIPasswordRecoveryRequest) ProtoMessage

func (*APIPasswordRecoveryRequest) ProtoMessage()

func (*APIPasswordRecoveryRequest) ProtoReflect

func (*APIPasswordRecoveryRequest) Reset

func (x *APIPasswordRecoveryRequest) Reset()

func (*APIPasswordRecoveryRequest) String

func (x *APIPasswordRecoveryRequest) String() string

type APITrafficBlacklistPostRequestBody

type APITrafficBlacklistPostRequestBody struct {
	IP     net.IP `json:"ip"`
	Period int    `json:"period"`
	Reason string `json:"reason"`
}

APITrafficBlacklistPostRequestBody APITrafficBlacklistPostRequestBody

type APITrafficTopItem

type APITrafficTopItem struct {
	Ip          string      `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	Count       int32       `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	Ban         *APIBanItem `protobuf:"bytes,3,opt,name=ban,proto3" json:"ban,omitempty"`
	InWhitelist bool        `protobuf:"varint,4,opt,name=in_whitelist,json=inWhitelist,proto3" json:"in_whitelist,omitempty"`
	WhoisUrl    string      `protobuf:"bytes,5,opt,name=whois_url,json=whoisUrl,proto3" json:"whois_url,omitempty"`
	// contains filtered or unexported fields
}

func (*APITrafficTopItem) Descriptor deprecated

func (*APITrafficTopItem) Descriptor() ([]byte, []int)

Deprecated: Use APITrafficTopItem.ProtoReflect.Descriptor instead.

func (*APITrafficTopItem) GetBan

func (x *APITrafficTopItem) GetBan() *APIBanItem

func (*APITrafficTopItem) GetCount

func (x *APITrafficTopItem) GetCount() int32

func (*APITrafficTopItem) GetInWhitelist

func (x *APITrafficTopItem) GetInWhitelist() bool

func (*APITrafficTopItem) GetIp

func (x *APITrafficTopItem) GetIp() string

func (*APITrafficTopItem) GetWhoisUrl

func (x *APITrafficTopItem) GetWhoisUrl() string

func (*APITrafficTopItem) ProtoMessage

func (*APITrafficTopItem) ProtoMessage()

func (*APITrafficTopItem) ProtoReflect

func (x *APITrafficTopItem) ProtoReflect() protoreflect.Message

func (*APITrafficTopItem) Reset

func (x *APITrafficTopItem) Reset()

func (*APITrafficTopItem) String

func (x *APITrafficTopItem) String() string

type APITrafficTopResponse

type APITrafficTopResponse struct {
	Items []*APITrafficTopItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*APITrafficTopResponse) Descriptor deprecated

func (*APITrafficTopResponse) Descriptor() ([]byte, []int)

Deprecated: Use APITrafficTopResponse.ProtoReflect.Descriptor instead.

func (*APITrafficTopResponse) GetItems

func (x *APITrafficTopResponse) GetItems() []*APITrafficTopItem

func (*APITrafficTopResponse) ProtoMessage

func (*APITrafficTopResponse) ProtoMessage()

func (*APITrafficTopResponse) ProtoReflect

func (x *APITrafficTopResponse) ProtoReflect() protoreflect.Message

func (*APITrafficTopResponse) Reset

func (x *APITrafficTopResponse) Reset()

func (*APITrafficTopResponse) String

func (x *APITrafficTopResponse) String() string

type APITrafficWhitelistItem

type APITrafficWhitelistItem struct {
	Ip          string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*APITrafficWhitelistItem) Descriptor deprecated

func (*APITrafficWhitelistItem) Descriptor() ([]byte, []int)

Deprecated: Use APITrafficWhitelistItem.ProtoReflect.Descriptor instead.

func (*APITrafficWhitelistItem) GetDescription

func (x *APITrafficWhitelistItem) GetDescription() string

func (*APITrafficWhitelistItem) GetIp

func (x *APITrafficWhitelistItem) GetIp() string

func (*APITrafficWhitelistItem) ProtoMessage

func (*APITrafficWhitelistItem) ProtoMessage()

func (*APITrafficWhitelistItem) ProtoReflect

func (x *APITrafficWhitelistItem) ProtoReflect() protoreflect.Message

func (*APITrafficWhitelistItem) Reset

func (x *APITrafficWhitelistItem) Reset()

func (*APITrafficWhitelistItem) String

func (x *APITrafficWhitelistItem) String() string

type APITrafficWhitelistItems

type APITrafficWhitelistItems struct {
	Items []*APITrafficWhitelistItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*APITrafficWhitelistItems) Descriptor deprecated

func (*APITrafficWhitelistItems) Descriptor() ([]byte, []int)

Deprecated: Use APITrafficWhitelistItems.ProtoReflect.Descriptor instead.

func (*APITrafficWhitelistItems) GetItems

func (*APITrafficWhitelistItems) ProtoMessage

func (*APITrafficWhitelistItems) ProtoMessage()

func (*APITrafficWhitelistItems) ProtoReflect

func (x *APITrafficWhitelistItems) ProtoReflect() protoreflect.Message

func (*APITrafficWhitelistItems) Reset

func (x *APITrafficWhitelistItems) Reset()

func (*APITrafficWhitelistItems) String

func (x *APITrafficWhitelistItems) String() string

type APITrafficWhitelistPostRequestBody

type APITrafficWhitelistPostRequestBody struct {
	IP net.IP `json:"ip"`
}

type APIUser

type APIUser struct {
	ID         int        `json:"id"`
	Name       string     `json:"name"`
	Deleted    bool       `json:"deleted"`
	LongAway   bool       `json:"long_away"`
	Green      bool       `json:"green"`
	Route      []string   `json:"route"`
	Identity   *string    `json:"identity"`
	Avatar     *string    `json:"avatar,omitempty"`
	Gravatar   *string    `json:"gravatar,omitempty"`
	LastOnline *time.Time `json:"last_online,omitempty"`
}

APIUser APIUser

type AclEnforceRequest

type AclEnforceRequest struct {
	Resource  string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	Privilege string `protobuf:"bytes,2,opt,name=privilege,proto3" json:"privilege,omitempty"`
	// contains filtered or unexported fields
}

func (*AclEnforceRequest) Descriptor deprecated

func (*AclEnforceRequest) Descriptor() ([]byte, []int)

Deprecated: Use AclEnforceRequest.ProtoReflect.Descriptor instead.

func (*AclEnforceRequest) GetPrivilege

func (x *AclEnforceRequest) GetPrivilege() string

func (*AclEnforceRequest) GetResource

func (x *AclEnforceRequest) GetResource() string

func (*AclEnforceRequest) ProtoMessage

func (*AclEnforceRequest) ProtoMessage()

func (*AclEnforceRequest) ProtoReflect

func (x *AclEnforceRequest) ProtoReflect() protoreflect.Message

func (*AclEnforceRequest) Reset

func (x *AclEnforceRequest) Reset()

func (*AclEnforceRequest) String

func (x *AclEnforceRequest) String() string

type AclEnforceResult

type AclEnforceResult struct {
	Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*AclEnforceResult) Descriptor deprecated

func (*AclEnforceResult) Descriptor() ([]byte, []int)

Deprecated: Use AclEnforceResult.ProtoReflect.Descriptor instead.

func (*AclEnforceResult) GetResult

func (x *AclEnforceResult) GetResult() bool

func (*AclEnforceResult) ProtoMessage

func (*AclEnforceResult) ProtoMessage()

func (*AclEnforceResult) ProtoReflect

func (x *AclEnforceResult) ProtoReflect() protoreflect.Message

func (*AclEnforceResult) Reset

func (x *AclEnforceResult) Reset()

func (*AclEnforceResult) String

func (x *AclEnforceResult) String() string

type AddToTrafficBlacklistRequest

type AddToTrafficBlacklistRequest struct {
	Ip     string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	Period int32  `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"`
	Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*AddToTrafficBlacklistRequest) Descriptor deprecated

func (*AddToTrafficBlacklistRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddToTrafficBlacklistRequest.ProtoReflect.Descriptor instead.

func (*AddToTrafficBlacklistRequest) GetIp

func (*AddToTrafficBlacklistRequest) GetPeriod

func (x *AddToTrafficBlacklistRequest) GetPeriod() int32

func (*AddToTrafficBlacklistRequest) GetReason

func (x *AddToTrafficBlacklistRequest) GetReason() string

func (*AddToTrafficBlacklistRequest) ProtoMessage

func (*AddToTrafficBlacklistRequest) ProtoMessage()

func (*AddToTrafficBlacklistRequest) ProtoReflect

func (*AddToTrafficBlacklistRequest) Reset

func (x *AddToTrafficBlacklistRequest) Reset()

func (*AddToTrafficBlacklistRequest) String

type AddToTrafficWhitelistRequest

type AddToTrafficWhitelistRequest struct {
	Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*AddToTrafficWhitelistRequest) Descriptor deprecated

func (*AddToTrafficWhitelistRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddToTrafficWhitelistRequest.ProtoReflect.Descriptor instead.

func (*AddToTrafficWhitelistRequest) GetIp

func (*AddToTrafficWhitelistRequest) ProtoMessage

func (*AddToTrafficWhitelistRequest) ProtoMessage()

func (*AddToTrafficWhitelistRequest) ProtoReflect

func (*AddToTrafficWhitelistRequest) Reset

func (x *AddToTrafficWhitelistRequest) Reset()

func (*AddToTrafficWhitelistRequest) String

type Application

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

Application is Service Main Object

func NewApplication

func NewApplication(config Config) (*Application, error)

NewApplication constructor

func (*Application) Autoban

func (s *Application) Autoban(quit chan bool) error

func (*Application) Close

func (s *Application) Close() error

Close Destructor

func (*Application) ListenDuplicateFinderAMQP

func (s *Application) ListenDuplicateFinderAMQP(quit chan bool) error

func (*Application) ListenMonitoringAMQP

func (s *Application) ListenMonitoringAMQP(quit chan bool) error

func (*Application) MigrateAutowp

func (s *Application) MigrateAutowp() error

func (*Application) MigrateTraffic

func (s *Application) MigrateTraffic() error

func (*Application) SchedulerHourly

func (s *Application) SchedulerHourly() error

func (*Application) ServePrivate

func (s *Application) ServePrivate(quit chan bool) error

func (*Application) ServePublic

func (s *Application) ServePublic(quit chan bool) error

type AutobanProfile

type AutobanProfile struct {
	Limit  int
	Reason string
	Group  []string
	Time   time.Duration
}

AutobanProfile AutobanProfile

type AutowpClient

type AutowpClient interface {
	AclEnforce(ctx context.Context, in *AclEnforceRequest, opts ...grpc.CallOption) (*AclEnforceResult, error)
	AddToTrafficBlacklist(ctx context.Context, in *AddToTrafficBlacklistRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	AddToTrafficWhitelist(ctx context.Context, in *AddToTrafficWhitelistRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CreateContact(ctx context.Context, in *CreateContactRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CreateFeedback(ctx context.Context, in *APICreateFeedbackRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteContact(ctx context.Context, in *DeleteContactRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteFromTrafficBlacklist(ctx context.Context, in *DeleteFromTrafficBlacklistRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteFromTrafficWhitelist(ctx context.Context, in *DeleteFromTrafficWhitelistRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetBrandIcons(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*BrandIcons, error)
	GetBrandVehicleTypes(ctx context.Context, in *GetBrandVehicleTypesRequest, opts ...grpc.CallOption) (*BrandVehicleTypeItems, error)
	GetCommentVotes(ctx context.Context, in *GetCommentVotesRequest, opts ...grpc.CallOption) (*CommentVoteItems, error)
	GetContact(ctx context.Context, in *GetContactRequest, opts ...grpc.CallOption) (*Contact, error)
	GetContacts(ctx context.Context, in *GetContactsRequest, opts ...grpc.CallOption) (*ContactItems, error)
	GetForumsUserSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*APIForumsUserSummary, error)
	GetIP(ctx context.Context, in *APIGetIPRequest, opts ...grpc.CallOption) (*APIIP, error)
	GetMessagesNewCount(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*APIMessageNewCount, error)
	GetMessagesSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*APIMessageSummary, error)
	GetPerspectives(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PerspectivesItems, error)
	GetPerspectivePages(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PerspectivePagesItems, error)
	GetReCaptchaConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReCaptchaConfig, error)
	GetSpecs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SpecsItems, error)
	GetTrafficTop(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*APITrafficTopResponse, error)
	GetTrafficWhitelist(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*APITrafficWhitelistItems, error)
	GetVehicleTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VehicleTypeItems, error)
	CreateUser(ctx context.Context, in *APICreateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	PasswordRecovery(ctx context.Context, in *APIPasswordRecoveryRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	PasswordRecoveryCheckCode(ctx context.Context, in *APIPasswordRecoveryCheckCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	PasswordRecoveryConfirm(ctx context.Context, in *APIPasswordRecoveryConfirmRequest, opts ...grpc.CallOption) (*APIPasswordRecoveryConfirmResponse, error)
	EmailChangeConfirm(ctx context.Context, in *APIEmailChangeConfirmRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

AutowpClient is the client API for Autowp service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAutowpClient

func NewAutowpClient(cc grpc.ClientConnInterface) AutowpClient

type AutowpServer

type AutowpServer interface {
	AclEnforce(context.Context, *AclEnforceRequest) (*AclEnforceResult, error)
	AddToTrafficBlacklist(context.Context, *AddToTrafficBlacklistRequest) (*emptypb.Empty, error)
	AddToTrafficWhitelist(context.Context, *AddToTrafficWhitelistRequest) (*emptypb.Empty, error)
	CreateContact(context.Context, *CreateContactRequest) (*emptypb.Empty, error)
	CreateFeedback(context.Context, *APICreateFeedbackRequest) (*emptypb.Empty, error)
	DeleteContact(context.Context, *DeleteContactRequest) (*emptypb.Empty, error)
	DeleteFromTrafficBlacklist(context.Context, *DeleteFromTrafficBlacklistRequest) (*emptypb.Empty, error)
	DeleteFromTrafficWhitelist(context.Context, *DeleteFromTrafficWhitelistRequest) (*emptypb.Empty, error)
	GetBrandIcons(context.Context, *emptypb.Empty) (*BrandIcons, error)
	GetBrandVehicleTypes(context.Context, *GetBrandVehicleTypesRequest) (*BrandVehicleTypeItems, error)
	GetCommentVotes(context.Context, *GetCommentVotesRequest) (*CommentVoteItems, error)
	GetContact(context.Context, *GetContactRequest) (*Contact, error)
	GetContacts(context.Context, *GetContactsRequest) (*ContactItems, error)
	GetForumsUserSummary(context.Context, *emptypb.Empty) (*APIForumsUserSummary, error)
	GetIP(context.Context, *APIGetIPRequest) (*APIIP, error)
	GetMessagesNewCount(context.Context, *emptypb.Empty) (*APIMessageNewCount, error)
	GetMessagesSummary(context.Context, *emptypb.Empty) (*APIMessageSummary, error)
	GetPerspectives(context.Context, *emptypb.Empty) (*PerspectivesItems, error)
	GetPerspectivePages(context.Context, *emptypb.Empty) (*PerspectivePagesItems, error)
	GetReCaptchaConfig(context.Context, *emptypb.Empty) (*ReCaptchaConfig, error)
	GetSpecs(context.Context, *emptypb.Empty) (*SpecsItems, error)
	GetTrafficTop(context.Context, *emptypb.Empty) (*APITrafficTopResponse, error)
	GetTrafficWhitelist(context.Context, *emptypb.Empty) (*APITrafficWhitelistItems, error)
	GetVehicleTypes(context.Context, *emptypb.Empty) (*VehicleTypeItems, error)
	CreateUser(context.Context, *APICreateUserRequest) (*emptypb.Empty, error)
	PasswordRecovery(context.Context, *APIPasswordRecoveryRequest) (*emptypb.Empty, error)
	PasswordRecoveryCheckCode(context.Context, *APIPasswordRecoveryCheckCodeRequest) (*emptypb.Empty, error)
	PasswordRecoveryConfirm(context.Context, *APIPasswordRecoveryConfirmRequest) (*APIPasswordRecoveryConfirmResponse, error)
	EmailChangeConfirm(context.Context, *APIEmailChangeConfirmRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

AutowpServer is the server API for Autowp service. All implementations must embed UnimplementedAutowpServer for forward compatibility

type BanItem

type BanItem struct {
	IP       net.IP    `json:"ip"`
	Until    time.Time `json:"up_to"`
	ByUserID int       `json:"by_user_id"`
	Reason   string    `json:"reason"`
}

BanItem BanItem

type BanRepository

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

BanRepository Main Object

func NewBanRepository

func NewBanRepository(db *pgxpool.Pool) (*BanRepository, error)

NewBanRepository constructor

func (*BanRepository) Add

func (s *BanRepository) Add(ip net.IP, duration time.Duration, byUserID int, reason string) error

Add IP to list of banned

func (*BanRepository) Clear

func (s *BanRepository) Clear() error

Clear removes all collected data

func (*BanRepository) Exists

func (s *BanRepository) Exists(ip net.IP) (bool, error)

Exists ban list already contains IP

func (*BanRepository) GC

func (s *BanRepository) GC() (int64, error)

GC Garbage Collect

func (*BanRepository) Get

func (s *BanRepository) Get(ip net.IP) (*BanItem, error)

Get ban info

func (*BanRepository) Remove

func (s *BanRepository) Remove(ip net.IP) error

Remove IP from list of banned

type BrandIcons

type BrandIcons struct {
	Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	Css   string `protobuf:"bytes,2,opt,name=css,proto3" json:"css,omitempty"`
	// contains filtered or unexported fields
}

func (*BrandIcons) Descriptor deprecated

func (*BrandIcons) Descriptor() ([]byte, []int)

Deprecated: Use BrandIcons.ProtoReflect.Descriptor instead.

func (*BrandIcons) GetCss

func (x *BrandIcons) GetCss() string

func (*BrandIcons) GetImage

func (x *BrandIcons) GetImage() string

func (*BrandIcons) ProtoMessage

func (*BrandIcons) ProtoMessage()

func (*BrandIcons) ProtoReflect

func (x *BrandIcons) ProtoReflect() protoreflect.Message

func (*BrandIcons) Reset

func (x *BrandIcons) Reset()

func (*BrandIcons) String

func (x *BrandIcons) String() string

type BrandVehicleType

type BrandVehicleType struct {
	Id         int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name       string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Catname    string `protobuf:"bytes,3,opt,name=catname,proto3" json:"catname,omitempty"`
	ItemsCount string `protobuf:"bytes,4,opt,name=items_count,json=itemsCount,proto3" json:"items_count,omitempty"`
	// contains filtered or unexported fields
}

func (*BrandVehicleType) Descriptor deprecated

func (*BrandVehicleType) Descriptor() ([]byte, []int)

Deprecated: Use BrandVehicleType.ProtoReflect.Descriptor instead.

func (*BrandVehicleType) GetCatname

func (x *BrandVehicleType) GetCatname() string

func (*BrandVehicleType) GetId

func (x *BrandVehicleType) GetId() int32

func (*BrandVehicleType) GetItemsCount

func (x *BrandVehicleType) GetItemsCount() string

func (*BrandVehicleType) GetName

func (x *BrandVehicleType) GetName() string

func (*BrandVehicleType) ProtoMessage

func (*BrandVehicleType) ProtoMessage()

func (*BrandVehicleType) ProtoReflect

func (x *BrandVehicleType) ProtoReflect() protoreflect.Message

func (*BrandVehicleType) Reset

func (x *BrandVehicleType) Reset()

func (*BrandVehicleType) String

func (x *BrandVehicleType) String() string

type BrandVehicleTypeItems

type BrandVehicleTypeItems struct {
	Items []*BrandVehicleType `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*BrandVehicleTypeItems) Descriptor deprecated

func (*BrandVehicleTypeItems) Descriptor() ([]byte, []int)

Deprecated: Use BrandVehicleTypeItems.ProtoReflect.Descriptor instead.

func (*BrandVehicleTypeItems) GetItems

func (x *BrandVehicleTypeItems) GetItems() []*BrandVehicleType

func (*BrandVehicleTypeItems) ProtoMessage

func (*BrandVehicleTypeItems) ProtoMessage()

func (*BrandVehicleTypeItems) ProtoReflect

func (x *BrandVehicleTypeItems) ProtoReflect() protoreflect.Message

func (*BrandVehicleTypeItems) Reset

func (x *BrandVehicleTypeItems) Reset()

func (*BrandVehicleTypeItems) String

func (x *BrandVehicleTypeItems) String() string

type Catalogue

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

Catalogue service

func NewCatalogue

func NewCatalogue(db *sql.DB, enforcer *casbin.Enforcer, oauthConfig OAuthConfig) (*Catalogue, error)

NewCatalogue constructor

type CommentVote

type CommentVote struct {
	Value CommentVote_VoteValue `protobuf:"varint,1,opt,name=value,proto3,enum=goautowp.CommentVote_VoteValue" json:"value,omitempty"`
	User  *User                 `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*CommentVote) Descriptor deprecated

func (*CommentVote) Descriptor() ([]byte, []int)

Deprecated: Use CommentVote.ProtoReflect.Descriptor instead.

func (*CommentVote) GetUser

func (x *CommentVote) GetUser() *User

func (*CommentVote) GetValue

func (x *CommentVote) GetValue() CommentVote_VoteValue

func (*CommentVote) ProtoMessage

func (*CommentVote) ProtoMessage()

func (*CommentVote) ProtoReflect

func (x *CommentVote) ProtoReflect() protoreflect.Message

func (*CommentVote) Reset

func (x *CommentVote) Reset()

func (*CommentVote) String

func (x *CommentVote) String() string

type CommentVoteItems

type CommentVoteItems struct {
	Items []*CommentVote `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*CommentVoteItems) Descriptor deprecated

func (*CommentVoteItems) Descriptor() ([]byte, []int)

Deprecated: Use CommentVoteItems.ProtoReflect.Descriptor instead.

func (*CommentVoteItems) GetItems

func (x *CommentVoteItems) GetItems() []*CommentVote

func (*CommentVoteItems) ProtoMessage

func (*CommentVoteItems) ProtoMessage()

func (*CommentVoteItems) ProtoReflect

func (x *CommentVoteItems) ProtoReflect() protoreflect.Message

func (*CommentVoteItems) Reset

func (x *CommentVoteItems) Reset()

func (*CommentVoteItems) String

func (x *CommentVoteItems) String() string

type CommentVote_VoteValue

type CommentVote_VoteValue int32
const (
	CommentVote_UNKNOWN  CommentVote_VoteValue = 0
	CommentVote_POSITIVE CommentVote_VoteValue = -1
	CommentVote_NEGATIVE CommentVote_VoteValue = 1
)

func (CommentVote_VoteValue) Descriptor

func (CommentVote_VoteValue) Enum

func (CommentVote_VoteValue) EnumDescriptor deprecated

func (CommentVote_VoteValue) EnumDescriptor() ([]byte, []int)

Deprecated: Use CommentVote_VoteValue.Descriptor instead.

func (CommentVote_VoteValue) Number

func (CommentVote_VoteValue) String

func (x CommentVote_VoteValue) String() string

func (CommentVote_VoteValue) Type

type Comments

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

Comments service

func NewComments

func NewComments(db *sql.DB, userExtractor *UserExtractor) *Comments

NewComments constructor

type CommentsType

type CommentsType int
const (
	CommentsTypePictureID    CommentsType = 1
	CommentsTypeItemID       CommentsType = 2
	CommentsTypeVotingID     CommentsType = 3
	CommentsTypeArticleID    CommentsType = 4
	CommentsTypeForumTopicID CommentsType = 5
)

type Config

type Config struct {
	GinMode           string                    `yaml:"gin-mode"           mapstructure:"gin-mode"`
	PublicRest        RestConfig                `yaml:"public-rest"        mapstructure:"public-rest"`
	DuplicateFinder   DuplicateFinderConfig     `yaml:"duplicate_finder"   mapstructure:"duplicate_finder"`
	AutowpDSN         string                    `yaml:"autowp-dsn"         mapstructure:"autowp-dsn"`
	AutowpMigrations  MigrationsConfig          `yaml:"autowp-migrations"  mapstructure:"autowp-migrations"`
	Sentry            SentryConfig              `yaml:"sentry"             mapstructure:"sentry"`
	FileStorage       FileStorageConfig         `yaml:"file_storage"       mapstructure:"file_storage"`
	OAuth             OAuthConfig               `yaml:"oauth"              mapstructure:"oauth"`
	RabbitMQ          string                    `yaml:"rabbitmq"           mapstructure:"rabbitmq"`
	MonitoringQueue   string                    `yaml:"monitoring_queue"   mapstructure:"monitoring_queue"`
	PrivateRest       RestConfig                `yaml:"private-rest"       mapstructure:"private-rest"`
	TrafficDSN        string                    `yaml:"traffic-dsn"        mapstructure:"traffic-dsn"`
	TrafficMigrations MigrationsConfig          `yaml:"traffic-migrations" mapstructure:"traffic-migrations"`
	Recaptcha         RecaptchaConfig           `yaml:"recaptcha"          mapstructure:"recaptcha"`
	MockEmailSender   bool                      `yaml:"mock-email-sender"  mapstructure:"mock-email-sender"`
	SMTP              SMTPConfig                `yaml:"smtp"               mapstructure:"smtp"`
	Feedback          FeedbackConfig            `yaml:"feedback"           mapstructure:"feedback"`
	KeyCloak          KeyCloakConfig            `yaml:"keycloak"           mapstructure:"keycloak"`
	UsersSalt         string                    `yaml:"users-salt"         mapstructure:"users-salt"`
	EmailSalt         string                    `yaml:"email-salt"         mapstructure:"email-salt"`
	Languages         map[string]LanguageConfig `yaml:"languages"          mapstructure:"languages"`
	Captcha           bool                      `yaml:"captcha"            mapstructure:"captcha"`
}

Config Application config definition

func LoadConfig

func LoadConfig() Config

LoadConfig LoadConfig

type Contact

type Contact struct {
	ContactUserId int32 `protobuf:"varint,1,opt,name=contact_user_id,json=contactUserId,proto3" json:"contact_user_id,omitempty"`
	User          *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*Contact) Descriptor deprecated

func (*Contact) Descriptor() ([]byte, []int)

Deprecated: Use Contact.ProtoReflect.Descriptor instead.

func (*Contact) GetContactUserId

func (x *Contact) GetContactUserId() int32

func (*Contact) GetUser

func (x *Contact) GetUser() *User

func (*Contact) ProtoMessage

func (*Contact) ProtoMessage()

func (*Contact) ProtoReflect

func (x *Contact) ProtoReflect() protoreflect.Message

func (*Contact) Reset

func (x *Contact) Reset()

func (*Contact) String

func (x *Contact) String() string

type ContactItems

type ContactItems struct {
	Items []*Contact `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*ContactItems) Descriptor deprecated

func (*ContactItems) Descriptor() ([]byte, []int)

Deprecated: Use ContactItems.ProtoReflect.Descriptor instead.

func (*ContactItems) GetItems

func (x *ContactItems) GetItems() []*Contact

func (*ContactItems) ProtoMessage

func (*ContactItems) ProtoMessage()

func (*ContactItems) ProtoReflect

func (x *ContactItems) ProtoReflect() protoreflect.Message

func (*ContactItems) Reset

func (x *ContactItems) Reset()

func (*ContactItems) String

func (x *ContactItems) String() string

type ContactsRepository

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

ContactsRepository Main Object

func NewContactsRepository

func NewContactsRepository(db *sql.DB) (*ContactsRepository, error)

NewBanRepository constructor

type Container

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

Container Container

func NewContainer

func NewContainer(config Config) *Container

NewContainer constructor

func (*Container) Close

func (s *Container) Close() error

func (*Container) GetAutowpDB

func (s *Container) GetAutowpDB() (*sql.DB, error)

func (*Container) GetBanRepository

func (s *Container) GetBanRepository() (*BanRepository, error)

func (*Container) GetCatalogue

func (s *Container) GetCatalogue() (*Catalogue, error)

func (*Container) GetComments

func (s *Container) GetComments() (*Comments, error)

func (*Container) GetConfig

func (s *Container) GetConfig() (Config, error)

func (*Container) GetContactsRepository

func (s *Container) GetContactsRepository() (*ContactsRepository, error)

func (*Container) GetDuplicateFinder

func (s *Container) GetDuplicateFinder() (*DuplicateFinder, error)

func (*Container) GetEmailSender

func (s *Container) GetEmailSender() (EmailSender, error)

func (*Container) GetEnforcer

func (s *Container) GetEnforcer() (*casbin.Enforcer, error)

func (*Container) GetFeedback

func (s *Container) GetFeedback() (*Feedback, error)

func (*Container) GetForums

func (s *Container) GetForums() (*Forums, error)

func (*Container) GetGRPCServer

func (s *Container) GetGRPCServer() (*GRPCServer, error)

func (*Container) GetIPExtractor

func (s *Container) GetIPExtractor() (*IPExtractor, error)

func (*Container) GetKeyCloak

func (s *Container) GetKeyCloak() (gocloak.GoCloak, error)

func (*Container) GetLocation

func (s *Container) GetLocation() (*time.Location, error)

GetLocation GetLocation

func (*Container) GetMessages

func (s *Container) GetMessages() (*Messages, error)

func (*Container) GetPasswordRecovery

func (s *Container) GetPasswordRecovery() (*PasswordRecovery, error)

func (*Container) GetPrivateHttpServer

func (s *Container) GetPrivateHttpServer() (*http.Server, error)

func (*Container) GetPrivateRouter

func (s *Container) GetPrivateRouter() (*gin.Engine, error)

func (*Container) GetPublicHttpServer

func (s *Container) GetPublicHttpServer() (*http.Server, error)

func (*Container) GetPublicRouter

func (s *Container) GetPublicRouter() (http.HandlerFunc, error)

func (*Container) GetTraffic

func (s *Container) GetTraffic() (*Traffic, error)

func (*Container) GetTrafficDB

func (s *Container) GetTrafficDB() (*pgxpool.Pool, error)

func (*Container) GetUserExtractor

func (s *Container) GetUserExtractor() (*UserExtractor, error)

func (*Container) GetUserRepository

func (s *Container) GetUserRepository() (*UserRepository, error)

func (*Container) SetEmailSender

func (s *Container) SetEmailSender(emailSender EmailSender)

type CreateContactRequest

type CreateContactRequest struct {
	UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateContactRequest) Descriptor deprecated

func (*CreateContactRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateContactRequest.ProtoReflect.Descriptor instead.

func (*CreateContactRequest) GetUserId

func (x *CreateContactRequest) GetUserId() int32

func (*CreateContactRequest) ProtoMessage

func (*CreateContactRequest) ProtoMessage()

func (*CreateContactRequest) ProtoReflect

func (x *CreateContactRequest) ProtoReflect() protoreflect.Message

func (*CreateContactRequest) Reset

func (x *CreateContactRequest) Reset()

func (*CreateContactRequest) String

func (x *CreateContactRequest) String() string

type CreateFeedbackRequest

type CreateFeedbackRequest struct {
	Name    string `json:"name"`
	Email   string `json:"email"`
	Message string `json:"message"`
	Captcha string `json:"captcha"`
	IP      string
}

CreateFeedbackRequest CreateFeedbackRequest

func (*CreateFeedbackRequest) Validate

func (s *CreateFeedbackRequest) Validate(captchaEnabled bool, ip string) ([]*errdetails.BadRequest_FieldViolation, error)

type CreateUserOptions

type CreateUserOptions struct {
	UserName        string `json:"user_name"`
	Name            string `json:"name"`
	Email           string `json:"email"`
	Timezone        string `json:"timezone"`
	Language        string `json:"language"`
	Password        string `json:"password"`
	PasswordConfirm string `json:"password_confirm"`
	Captcha         string `json:"captcha"`
}

CreateUserOptions CreateUserOptions

type DBUser

type DBUser struct {
	ID         int
	Name       string
	Deleted    bool
	Identity   *string
	LastOnline *time.Time
	Role       string
	EMail      *string
	Img        *int
}

DBUser DBUser

type DeleteContactRequest

type DeleteContactRequest struct {
	UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteContactRequest) Descriptor deprecated

func (*DeleteContactRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteContactRequest.ProtoReflect.Descriptor instead.

func (*DeleteContactRequest) GetUserId

func (x *DeleteContactRequest) GetUserId() int32

func (*DeleteContactRequest) ProtoMessage

func (*DeleteContactRequest) ProtoMessage()

func (*DeleteContactRequest) ProtoReflect

func (x *DeleteContactRequest) ProtoReflect() protoreflect.Message

func (*DeleteContactRequest) Reset

func (x *DeleteContactRequest) Reset()

func (*DeleteContactRequest) String

func (x *DeleteContactRequest) String() string

type DeleteFromTrafficBlacklistRequest

type DeleteFromTrafficBlacklistRequest struct {
	Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteFromTrafficBlacklistRequest) Descriptor deprecated

func (*DeleteFromTrafficBlacklistRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteFromTrafficBlacklistRequest.ProtoReflect.Descriptor instead.

func (*DeleteFromTrafficBlacklistRequest) GetIp

func (*DeleteFromTrafficBlacklistRequest) ProtoMessage

func (*DeleteFromTrafficBlacklistRequest) ProtoMessage()

func (*DeleteFromTrafficBlacklistRequest) ProtoReflect

func (*DeleteFromTrafficBlacklistRequest) Reset

func (*DeleteFromTrafficBlacklistRequest) String

type DeleteFromTrafficWhitelistRequest

type DeleteFromTrafficWhitelistRequest struct {
	Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteFromTrafficWhitelistRequest) Descriptor deprecated

func (*DeleteFromTrafficWhitelistRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteFromTrafficWhitelistRequest.ProtoReflect.Descriptor instead.

func (*DeleteFromTrafficWhitelistRequest) GetIp

func (*DeleteFromTrafficWhitelistRequest) ProtoMessage

func (*DeleteFromTrafficWhitelistRequest) ProtoMessage()

func (*DeleteFromTrafficWhitelistRequest) ProtoReflect

func (*DeleteFromTrafficWhitelistRequest) Reset

func (*DeleteFromTrafficWhitelistRequest) String

type DuplicateFinder

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

DuplicateFinder Main Object

func NewDuplicateFinder

func NewDuplicateFinder(db *sql.DB) (*DuplicateFinder, error)

NewDuplicateFinder constructor

func (*DuplicateFinder) Index

func (s *DuplicateFinder) Index(id int, url string) error

Index picture image #nosec G107

func (*DuplicateFinder) ListenAMQP

func (s *DuplicateFinder) ListenAMQP(url string, queue string, quitChan chan bool) error

Listen for incoming messages

type DuplicateFinderConfig

type DuplicateFinderConfig struct {
	RabbitMQ string `yaml:"rabbitmq" mapstructure:"rabbitmq"`
	Queue    string `yaml:"queue"    mapstructure:"queue"`
}

DuplicateFinderConfig DuplicateFinderConfig

type DuplicateFinderInputMessage

type DuplicateFinderInputMessage struct {
	PictureID int    `json:"picture_id"`
	URL       string `json:"url"`
}

DuplicateFinderInputMessage InputMessage

type EmailSender

type EmailSender interface {
	Send(from string, to []string, subject, body, replyTo string) error
}

type ErrorDetails

type ErrorDetails struct {
	RetryInfo           *errdetails.RetryInfo           `protobuf:"bytes,1,opt,name=retryInfo,proto3" json:"retryInfo,omitempty"`
	DebugInfo           *errdetails.DebugInfo           `protobuf:"bytes,2,opt,name=debugInfo,proto3" json:"debugInfo,omitempty"`
	QuotaFailure        *errdetails.QuotaFailure        `protobuf:"bytes,3,opt,name=quotaFailure,proto3" json:"quotaFailure,omitempty"`
	PreconditionFailure *errdetails.PreconditionFailure `protobuf:"bytes,4,opt,name=preconditionFailure,proto3" json:"preconditionFailure,omitempty"`
	BadRequest          *errdetails.BadRequest          `protobuf:"bytes,5,opt,name=badRequest,proto3" json:"badRequest,omitempty"`
	RequestInfo         *errdetails.RequestInfo         `protobuf:"bytes,6,opt,name=requestInfo,proto3" json:"requestInfo,omitempty"`
	Help                *errdetails.Help                `protobuf:"bytes,7,opt,name=help,proto3" json:"help,omitempty"`
	LocalizedMessage    *errdetails.LocalizedMessage    `protobuf:"bytes,8,opt,name=localizedMessage,proto3" json:"localizedMessage,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorDetails) Descriptor deprecated

func (*ErrorDetails) Descriptor() ([]byte, []int)

Deprecated: Use ErrorDetails.ProtoReflect.Descriptor instead.

func (*ErrorDetails) GetBadRequest

func (x *ErrorDetails) GetBadRequest() *errdetails.BadRequest

func (*ErrorDetails) GetDebugInfo

func (x *ErrorDetails) GetDebugInfo() *errdetails.DebugInfo

func (*ErrorDetails) GetHelp

func (x *ErrorDetails) GetHelp() *errdetails.Help

func (*ErrorDetails) GetLocalizedMessage

func (x *ErrorDetails) GetLocalizedMessage() *errdetails.LocalizedMessage

func (*ErrorDetails) GetPreconditionFailure

func (x *ErrorDetails) GetPreconditionFailure() *errdetails.PreconditionFailure

func (*ErrorDetails) GetQuotaFailure

func (x *ErrorDetails) GetQuotaFailure() *errdetails.QuotaFailure

func (*ErrorDetails) GetRequestInfo

func (x *ErrorDetails) GetRequestInfo() *errdetails.RequestInfo

func (*ErrorDetails) GetRetryInfo

func (x *ErrorDetails) GetRetryInfo() *errdetails.RetryInfo

func (*ErrorDetails) ProtoMessage

func (*ErrorDetails) ProtoMessage()

func (*ErrorDetails) ProtoReflect

func (x *ErrorDetails) ProtoReflect() protoreflect.Message

func (*ErrorDetails) Reset

func (x *ErrorDetails) Reset()

func (*ErrorDetails) String

func (x *ErrorDetails) String() string

type Feedback

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

Feedback Main Object

func NewFeedback

func NewFeedback(config FeedbackConfig, recaptchaConfig RecaptchaConfig, captchaEnabled bool, emailSender EmailSender) (*Feedback, error)

NewFeedback constructor

func (*Feedback) Create

type FeedbackConfig

type FeedbackConfig struct {
	From    string   `yaml:"from"    mapstructure:"from"`
	To      []string `yaml:"to"      mapstructure:"to"`
	Subject string   `yaml:"subject" mapstructure:"subject"`
}

FeedbackConfig FeedbackConfig

type FileStorageConfig

type FileStorageConfig struct {
	S3     S3Config `yaml:"s3"     mapstructure:"s3"`
	Bucket string   `yaml:"bucket" mapstructure:"bucket"`
}

FileStorageConfig FileStorageConfig

type Forums

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

Forums Main Object

func NewForums

func NewForums(db *sql.DB) *Forums

func (*Forums) GetUserSummary

func (s *Forums) GetUserSummary(userID int) (int, error)

type GRPCServer

type GRPCServer struct {
	UnimplementedAutowpServer
	// contains filtered or unexported fields
}

func NewGRPCServer

func NewGRPCServer(
	container *Container,
	catalogue *Catalogue,
	reCaptchaConfig RecaptchaConfig,
	fileStorageConfig FileStorageConfig,
	db *sql.DB,
	enforcer *casbin.Enforcer,
	oauthConfig OAuthConfig,
	contactsRepository *ContactsRepository,
	userRepository *UserRepository,
	userExtractor *UserExtractor,
	comments *Comments,
	traffic *Traffic,
	ipExtractor *IPExtractor,
	feedback *Feedback,
	forums *Forums,
	messages *Messages,
) (*GRPCServer, error)

func (*GRPCServer) AclEnforce

func (s *GRPCServer) AclEnforce(ctx context.Context, in *AclEnforceRequest) (*AclEnforceResult, error)

func (*GRPCServer) AddToTrafficBlacklist

func (s *GRPCServer) AddToTrafficBlacklist(ctx context.Context, in *AddToTrafficBlacklistRequest) (*emptypb.Empty, error)

func (*GRPCServer) AddToTrafficWhitelist

func (s *GRPCServer) AddToTrafficWhitelist(ctx context.Context, in *AddToTrafficWhitelistRequest) (*emptypb.Empty, error)

func (*GRPCServer) CreateContact

func (s *GRPCServer) CreateContact(ctx context.Context, in *CreateContactRequest) (*emptypb.Empty, error)

func (*GRPCServer) CreateFeedback

func (s *GRPCServer) CreateFeedback(ctx context.Context, in *APICreateFeedbackRequest) (*emptypb.Empty, error)

func (*GRPCServer) CreateUser

func (s *GRPCServer) CreateUser(ctx context.Context, in *APICreateUserRequest) (*emptypb.Empty, error)

func (*GRPCServer) DeleteContact

func (s *GRPCServer) DeleteContact(ctx context.Context, in *DeleteContactRequest) (*emptypb.Empty, error)

func (*GRPCServer) DeleteFromTrafficBlacklist

func (s *GRPCServer) DeleteFromTrafficBlacklist(ctx context.Context, in *DeleteFromTrafficBlacklistRequest) (*emptypb.Empty, error)

func (*GRPCServer) DeleteFromTrafficWhitelist

func (s *GRPCServer) DeleteFromTrafficWhitelist(ctx context.Context, in *DeleteFromTrafficWhitelistRequest) (*emptypb.Empty, error)

func (*GRPCServer) EmailChangeConfirm

func (s *GRPCServer) EmailChangeConfirm(_ context.Context, in *APIEmailChangeConfirmRequest) (*emptypb.Empty, error)

func (*GRPCServer) GetBrandIcons

func (s *GRPCServer) GetBrandIcons(context.Context, *emptypb.Empty) (*BrandIcons, error)

func (*GRPCServer) GetBrandVehicleTypes

func (*GRPCServer) GetCommentVotes

func (s *GRPCServer) GetCommentVotes(_ context.Context, in *GetCommentVotesRequest) (*CommentVoteItems, error)

func (*GRPCServer) GetContact

func (s *GRPCServer) GetContact(ctx context.Context, in *GetContactRequest) (*Contact, error)

func (*GRPCServer) GetContacts

func (s *GRPCServer) GetContacts(ctx context.Context, in *GetContactsRequest) (*ContactItems, error)

func (*GRPCServer) GetForumsUserSummary

func (s *GRPCServer) GetForumsUserSummary(ctx context.Context, _ *emptypb.Empty) (*APIForumsUserSummary, error)

func (*GRPCServer) GetIP

func (s *GRPCServer) GetIP(ctx context.Context, in *APIGetIPRequest) (*APIIP, error)

func (*GRPCServer) GetMessagesNewCount

func (s *GRPCServer) GetMessagesNewCount(ctx context.Context, _ *emptypb.Empty) (*APIMessageNewCount, error)

func (*GRPCServer) GetMessagesSummary

func (s *GRPCServer) GetMessagesSummary(ctx context.Context, _ *emptypb.Empty) (*APIMessageSummary, error)

func (*GRPCServer) GetPerspectivePages

func (s *GRPCServer) GetPerspectivePages(context.Context, *emptypb.Empty) (*PerspectivePagesItems, error)

func (*GRPCServer) GetPerspectives

func (s *GRPCServer) GetPerspectives(context.Context, *emptypb.Empty) (*PerspectivesItems, error)

func (*GRPCServer) GetReCaptchaConfig

func (s *GRPCServer) GetReCaptchaConfig(context.Context, *emptypb.Empty) (*ReCaptchaConfig, error)

func (*GRPCServer) GetSpecs

func (s *GRPCServer) GetSpecs(context.Context, *emptypb.Empty) (*SpecsItems, error)

func (*GRPCServer) GetTrafficTop

func (s *GRPCServer) GetTrafficTop(_ context.Context, _ *emptypb.Empty) (*APITrafficTopResponse, error)

func (*GRPCServer) GetTrafficWhitelist

func (s *GRPCServer) GetTrafficWhitelist(ctx context.Context, _ *emptypb.Empty) (*APITrafficWhitelistItems, error)

func (*GRPCServer) GetVehicleTypes

func (s *GRPCServer) GetVehicleTypes(ctx context.Context, _ *emptypb.Empty) (*VehicleTypeItems, error)

func (*GRPCServer) PasswordRecovery

func (s *GRPCServer) PasswordRecovery(ctx context.Context, in *APIPasswordRecoveryRequest) (*emptypb.Empty, error)

func (*GRPCServer) PasswordRecoveryCheckCode

func (s *GRPCServer) PasswordRecoveryCheckCode(_ context.Context, in *APIPasswordRecoveryCheckCodeRequest) (*emptypb.Empty, error)

type GetBrandVehicleTypesRequest

type GetBrandVehicleTypesRequest struct {
	BrandId int32 `protobuf:"varint,1,opt,name=brand_id,json=brandId,proto3" json:"brand_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetBrandVehicleTypesRequest) Descriptor deprecated

func (*GetBrandVehicleTypesRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetBrandVehicleTypesRequest.ProtoReflect.Descriptor instead.

func (*GetBrandVehicleTypesRequest) GetBrandId

func (x *GetBrandVehicleTypesRequest) GetBrandId() int32

func (*GetBrandVehicleTypesRequest) ProtoMessage

func (*GetBrandVehicleTypesRequest) ProtoMessage()

func (*GetBrandVehicleTypesRequest) ProtoReflect

func (*GetBrandVehicleTypesRequest) Reset

func (x *GetBrandVehicleTypesRequest) Reset()

func (*GetBrandVehicleTypesRequest) String

func (x *GetBrandVehicleTypesRequest) String() string

type GetCommentVotesRequest

type GetCommentVotesRequest struct {
	CommentId int32 `protobuf:"varint,1,opt,name=comment_id,json=commentId,proto3" json:"comment_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCommentVotesRequest) Descriptor deprecated

func (*GetCommentVotesRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetCommentVotesRequest.ProtoReflect.Descriptor instead.

func (*GetCommentVotesRequest) GetCommentId

func (x *GetCommentVotesRequest) GetCommentId() int32

func (*GetCommentVotesRequest) ProtoMessage

func (*GetCommentVotesRequest) ProtoMessage()

func (*GetCommentVotesRequest) ProtoReflect

func (x *GetCommentVotesRequest) ProtoReflect() protoreflect.Message

func (*GetCommentVotesRequest) Reset

func (x *GetCommentVotesRequest) Reset()

func (*GetCommentVotesRequest) String

func (x *GetCommentVotesRequest) String() string

type GetContactRequest

type GetContactRequest struct {
	UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetContactRequest) Descriptor deprecated

func (*GetContactRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetContactRequest.ProtoReflect.Descriptor instead.

func (*GetContactRequest) GetUserId

func (x *GetContactRequest) GetUserId() int32

func (*GetContactRequest) ProtoMessage

func (*GetContactRequest) ProtoMessage()

func (*GetContactRequest) ProtoReflect

func (x *GetContactRequest) ProtoReflect() protoreflect.Message

func (*GetContactRequest) Reset

func (x *GetContactRequest) Reset()

func (*GetContactRequest) String

func (x *GetContactRequest) String() string

type GetContactsRequest

type GetContactsRequest struct {
	Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

func (*GetContactsRequest) Descriptor deprecated

func (*GetContactsRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetContactsRequest.ProtoReflect.Descriptor instead.

func (*GetContactsRequest) GetFields

func (x *GetContactsRequest) GetFields() []string

func (*GetContactsRequest) ProtoMessage

func (*GetContactsRequest) ProtoMessage()

func (*GetContactsRequest) ProtoReflect

func (x *GetContactsRequest) ProtoReflect() protoreflect.Message

func (*GetContactsRequest) Reset

func (x *GetContactsRequest) Reset()

func (*GetContactsRequest) String

func (x *GetContactsRequest) String() string

type GetUsersOptions

type GetUsersOptions struct {
	ID         int
	InContacts int
	Order      []string
	Fields     map[string]bool
	Deleted    *bool
}

type IPExtractor

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

func NewIPExtractor

func NewIPExtractor(container *Container) *IPExtractor

func (*IPExtractor) Extract

func (s *IPExtractor) Extract(ip net.IP, fields map[string]bool, role string) (*APIIP, error)

type KeyCloakConfig

type KeyCloakConfig struct {
	URL          string `yaml:"url"           mapstructure:"url"`
	ClientID     string `yaml:"client-id"     mapstructure:"client-id"`
	ClientSecret string `yaml:"client-secret" mapstructure:"client-secret"`
	Realm        string `yaml:"realm"         mapstructure:"realm"`
}

KeyCloakConfig KeyCloakConfig

type LanguageConfig

type LanguageConfig struct {
	Hostname string   `yaml:"hostname" mapstructure:"hostname"`
	Timezone string   `yaml:"timezone" mapstructure:"timezone"`
	Name     string   `yaml:"name"     mapstructure:"name"`
	Flag     string   `yaml:"flag"     mapstructure:"flag"`
	Aliases  []string `yaml:"aliases"  mapstructure:"aliases"`
}

LanguageConfig LanguageConfig

type ListOfTopItem

type ListOfTopItem struct {
	IP    net.IP `json:"ip"`
	Count int    `json:"count"`
}

ListOfTopItem ListOfTopItem

type Messages

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

Messages Main Object

func NewMessages

func NewMessages(db *sql.DB) *Messages

func (*Messages) GetInboxCount

func (s *Messages) GetInboxCount(userID int) (int, error)

func (*Messages) GetInboxNewCount

func (s *Messages) GetInboxNewCount(userID int) (int, error)

func (*Messages) GetSentCount

func (s *Messages) GetSentCount(userID int) (int, error)

func (*Messages) GetSystemCount

func (s *Messages) GetSystemCount(userID int) (int, error)

func (*Messages) GetSystemNewCount

func (s *Messages) GetSystemNewCount(userID int) (int, error)

func (*Messages) GetUserNewMessagesCount

func (s *Messages) GetUserNewMessagesCount(userID int) (int, error)

type MigrationsConfig

type MigrationsConfig struct {
	DSN string `yaml:"dsn" mapstructure:"dsn"`
	Dir string `yaml:"dir" mapstructure:"dir"`
}

MigrationsConfig MigrationsConfig

type MockEmailSender

type MockEmailSender struct {
	Body string
}

func (*MockEmailSender) Send

func (s *MockEmailSender) Send(from string, to []string, subject, body, _ string) error

type Monitoring

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

Monitoring Main Object

func NewMonitoring

func NewMonitoring(db *pgxpool.Pool) (*Monitoring, error)

NewMonitoring constructor

func (*Monitoring) Add

func (s *Monitoring) Add(ip net.IP, timestamp time.Time) error

Add item to Monitoring

func (*Monitoring) Clear

func (s *Monitoring) Clear() error

Clear removes all collected data

func (*Monitoring) ClearIP

func (s *Monitoring) ClearIP(ip net.IP) error

ClearIP removes all data collected for IP

func (*Monitoring) ExistsIP

func (s *Monitoring) ExistsIP(ip net.IP) (bool, error)

ExistsIP ban list already contains IP

func (*Monitoring) GC

func (s *Monitoring) GC() (int64, error)

GC Garbage Collect

func (*Monitoring) ListByBanProfile

func (s *Monitoring) ListByBanProfile(profile AutobanProfile) ([]net.IP, error)

ListByBanProfile ListByBanProfile

func (*Monitoring) ListOfTop

func (s *Monitoring) ListOfTop(limit int) ([]ListOfTopItem, error)

ListOfTop ListOfTop

func (*Monitoring) Listen

func (s *Monitoring) Listen(url string, queue string, quitChan chan bool) error

Listen for incoming messages

type MonitoringInputMessage

type MonitoringInputMessage struct {
	IP        net.IP    `json:"ip"`
	Timestamp time.Time `json:"timestamp"`
}

MonitoringInputMessage InputMessage

type OAuthConfig

type OAuthConfig struct {
	Secret string `yaml:"secret" mapstructure:"secret"`
}

OAuthConfig OAuthConfig

type PasswordRecovery

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

func NewPasswordRecovery

func NewPasswordRecovery(db *sql.DB, captchaEnabled bool, languages map[string]LanguageConfig, emailSender EmailSender) *PasswordRecovery

func (*PasswordRecovery) DeleteToken

func (s *PasswordRecovery) DeleteToken(token string) error

func (*PasswordRecovery) Finish

func (s *PasswordRecovery) Finish(token string, password string, passwordConfirm string) ([]*errdetails.BadRequest_FieldViolation, int64, error)

func (*PasswordRecovery) GetUserID

func (s *PasswordRecovery) GetUserID(token string) (int64, error)

func (*PasswordRecovery) Start

func (s *PasswordRecovery) Start(email string, captcha string, ip string) ([]*errdetails.BadRequest_FieldViolation, error)

func (*PasswordRecovery) ValidateNewPassword

func (s *PasswordRecovery) ValidateNewPassword(password string, passwordConfirm string) ([]*errdetails.BadRequest_FieldViolation, error)

type Perspective

type Perspective struct {
	Id   int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Perspective) Descriptor deprecated

func (*Perspective) Descriptor() ([]byte, []int)

Deprecated: Use Perspective.ProtoReflect.Descriptor instead.

func (*Perspective) GetId

func (x *Perspective) GetId() int32

func (*Perspective) GetName

func (x *Perspective) GetName() string

func (*Perspective) ProtoMessage

func (*Perspective) ProtoMessage()

func (*Perspective) ProtoReflect

func (x *Perspective) ProtoReflect() protoreflect.Message

func (*Perspective) Reset

func (x *Perspective) Reset()

func (*Perspective) String

func (x *Perspective) String() string

type PerspectiveGroup

type PerspectiveGroup struct {
	Id           int32          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name         string         `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Perspectives []*Perspective `protobuf:"bytes,3,rep,name=perspectives,proto3" json:"perspectives,omitempty"`
	// contains filtered or unexported fields
}

func (*PerspectiveGroup) Descriptor deprecated

func (*PerspectiveGroup) Descriptor() ([]byte, []int)

Deprecated: Use PerspectiveGroup.ProtoReflect.Descriptor instead.

func (*PerspectiveGroup) GetId

func (x *PerspectiveGroup) GetId() int32

func (*PerspectiveGroup) GetName

func (x *PerspectiveGroup) GetName() string

func (*PerspectiveGroup) GetPerspectives

func (x *PerspectiveGroup) GetPerspectives() []*Perspective

func (*PerspectiveGroup) ProtoMessage

func (*PerspectiveGroup) ProtoMessage()

func (*PerspectiveGroup) ProtoReflect

func (x *PerspectiveGroup) ProtoReflect() protoreflect.Message

func (*PerspectiveGroup) Reset

func (x *PerspectiveGroup) Reset()

func (*PerspectiveGroup) String

func (x *PerspectiveGroup) String() string

type PerspectivePage

type PerspectivePage struct {
	Id     int32               `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name   string              `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Groups []*PerspectiveGroup `protobuf:"bytes,3,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*PerspectivePage) Descriptor deprecated

func (*PerspectivePage) Descriptor() ([]byte, []int)

Deprecated: Use PerspectivePage.ProtoReflect.Descriptor instead.

func (*PerspectivePage) GetGroups

func (x *PerspectivePage) GetGroups() []*PerspectiveGroup

func (*PerspectivePage) GetId

func (x *PerspectivePage) GetId() int32

func (*PerspectivePage) GetName

func (x *PerspectivePage) GetName() string

func (*PerspectivePage) ProtoMessage

func (*PerspectivePage) ProtoMessage()

func (*PerspectivePage) ProtoReflect

func (x *PerspectivePage) ProtoReflect() protoreflect.Message

func (*PerspectivePage) Reset

func (x *PerspectivePage) Reset()

func (*PerspectivePage) String

func (x *PerspectivePage) String() string

type PerspectivePagesItems

type PerspectivePagesItems struct {
	Items []*PerspectivePage `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*PerspectivePagesItems) Descriptor deprecated

func (*PerspectivePagesItems) Descriptor() ([]byte, []int)

Deprecated: Use PerspectivePagesItems.ProtoReflect.Descriptor instead.

func (*PerspectivePagesItems) GetItems

func (x *PerspectivePagesItems) GetItems() []*PerspectivePage

func (*PerspectivePagesItems) ProtoMessage

func (*PerspectivePagesItems) ProtoMessage()

func (*PerspectivePagesItems) ProtoReflect

func (x *PerspectivePagesItems) ProtoReflect() protoreflect.Message

func (*PerspectivePagesItems) Reset

func (x *PerspectivePagesItems) Reset()

func (*PerspectivePagesItems) String

func (x *PerspectivePagesItems) String() string

type PerspectivesItems

type PerspectivesItems struct {
	Items []*Perspective `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*PerspectivesItems) Descriptor deprecated

func (*PerspectivesItems) Descriptor() ([]byte, []int)

Deprecated: Use PerspectivesItems.ProtoReflect.Descriptor instead.

func (*PerspectivesItems) GetItems

func (x *PerspectivesItems) GetItems() []*Perspective

func (*PerspectivesItems) ProtoMessage

func (*PerspectivesItems) ProtoMessage()

func (*PerspectivesItems) ProtoReflect

func (x *PerspectivesItems) ProtoReflect() protoreflect.Message

func (*PerspectivesItems) Reset

func (x *PerspectivesItems) Reset()

func (*PerspectivesItems) String

func (x *PerspectivesItems) String() string

type ReCaptchaConfig

type ReCaptchaConfig struct {
	PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// contains filtered or unexported fields
}

func (*ReCaptchaConfig) Descriptor deprecated

func (*ReCaptchaConfig) Descriptor() ([]byte, []int)

Deprecated: Use ReCaptchaConfig.ProtoReflect.Descriptor instead.

func (*ReCaptchaConfig) GetPublicKey

func (x *ReCaptchaConfig) GetPublicKey() string

func (*ReCaptchaConfig) ProtoMessage

func (*ReCaptchaConfig) ProtoMessage()

func (*ReCaptchaConfig) ProtoReflect

func (x *ReCaptchaConfig) ProtoReflect() protoreflect.Message

func (*ReCaptchaConfig) Reset

func (x *ReCaptchaConfig) Reset()

func (*ReCaptchaConfig) String

func (x *ReCaptchaConfig) String() string

type RecaptchaConfig

type RecaptchaConfig struct {
	PublicKey  string `yaml:"public-key"  mapstructure:"public-key"`
	PrivateKey string `yaml:"private-key" mapstructure:"private-key"`
}

RecaptchaConfig RecaptchaConfig

type RestConfig

type RestConfig struct {
	Listen string `mapstructure:"listen"`
}

RestConfig RestConfig

type S3Config

type S3Config struct {
	Credentials      S3CredentialsConfig `yaml:"credentials"         mapstructure:"credentials"`
	Region           string              `yaml:"region"              mapstructure:"region"`
	Endpoints        []string            `yaml:"endpoints"           mapstructure:"endpoints"`
	S3ForcePathStyle bool                `yaml:"s3_force_path_style" mapstructure:"s3_force_path_style"`
}

S3Config S3Config

type S3CredentialsConfig

type S3CredentialsConfig struct {
	Key    string `yaml:"key"    mapstructure:"key"`
	Secret string `yaml:"secret" mapstructure:"secret"`
}

S3CredentialsConfig S3CredentialsConfig

type SMTPConfig

type SMTPConfig struct {
	Hostname string `yaml:"hostname" mapstructure:"hostname"`
	Port     int    `yaml:"port"     mapstructure:"port"`
	Username string `yaml:"username" mapstructure:"username"`
	Password string `yaml:"password" mapstructure:"password"`
}

SMTPConfig SMTPConfig

type SentryConfig

type SentryConfig struct {
	DSN         string `yaml:"dsn"         mapstructure:"dsn"`
	Environment string `yaml:"environment" mapstructure:"environment"`
}

SentryConfig SentryConfig

type SmtpEmailSender

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

func (*SmtpEmailSender) Send

func (s *SmtpEmailSender) Send(from string, to []string, subject, body, replyTo string) error

type Spec

type Spec struct {
	Id        int32   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name      string  `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	ShortName string  `protobuf:"bytes,3,opt,name=short_name,json=shortName,proto3" json:"short_name,omitempty"`
	Childs    []*Spec `protobuf:"bytes,4,rep,name=childs,proto3" json:"childs,omitempty"`
	// contains filtered or unexported fields
}

func (*Spec) Descriptor deprecated

func (*Spec) Descriptor() ([]byte, []int)

Deprecated: Use Spec.ProtoReflect.Descriptor instead.

func (*Spec) GetChilds

func (x *Spec) GetChilds() []*Spec

func (*Spec) GetId

func (x *Spec) GetId() int32

func (*Spec) GetName

func (x *Spec) GetName() string

func (*Spec) GetShortName

func (x *Spec) GetShortName() string

func (*Spec) ProtoMessage

func (*Spec) ProtoMessage()

func (*Spec) ProtoReflect

func (x *Spec) ProtoReflect() protoreflect.Message

func (*Spec) Reset

func (x *Spec) Reset()

func (*Spec) String

func (x *Spec) String() string

type SpecsItems

type SpecsItems struct {
	Items []*Spec `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*SpecsItems) Descriptor deprecated

func (*SpecsItems) Descriptor() ([]byte, []int)

Deprecated: Use SpecsItems.ProtoReflect.Descriptor instead.

func (*SpecsItems) GetItems

func (x *SpecsItems) GetItems() []*Spec

func (*SpecsItems) ProtoMessage

func (*SpecsItems) ProtoMessage()

func (*SpecsItems) ProtoReflect

func (x *SpecsItems) ProtoReflect() protoreflect.Message

func (*SpecsItems) Reset

func (x *SpecsItems) Reset()

func (*SpecsItems) String

func (x *SpecsItems) String() string

type Traffic

type Traffic struct {
	Monitoring *Monitoring
	Whitelist  *Whitelist
	Ban        *BanRepository
	// contains filtered or unexported fields
}

Traffic Traffic

func NewTraffic

func NewTraffic(pool *pgxpool.Pool, autowpDB *sql.DB, enforcer *casbin.Enforcer, ban *BanRepository, userExtractor *UserExtractor, oauthConfig OAuthConfig) (*Traffic, error)

NewTraffic constructor

func (*Traffic) AutoBan

func (s *Traffic) AutoBan() error

func (*Traffic) AutoBanByProfile

func (s *Traffic) AutoBanByProfile(profile AutobanProfile) error

func (*Traffic) AutoWhitelist

func (s *Traffic) AutoWhitelist() error

func (*Traffic) AutoWhitelistIP

func (s *Traffic) AutoWhitelistIP(ip net.IP) error

func (*Traffic) SetupPrivateRouter

func (s *Traffic) SetupPrivateRouter(r *gin.Engine)

type UnimplementedAutowpServer

type UnimplementedAutowpServer struct {
}

UnimplementedAutowpServer must be embedded to have forward compatible implementations.

func (UnimplementedAutowpServer) AclEnforce

func (UnimplementedAutowpServer) AddToTrafficBlacklist

func (UnimplementedAutowpServer) AddToTrafficWhitelist

func (UnimplementedAutowpServer) CreateContact

func (UnimplementedAutowpServer) CreateFeedback

func (UnimplementedAutowpServer) CreateUser

func (UnimplementedAutowpServer) DeleteContact

func (UnimplementedAutowpServer) DeleteFromTrafficBlacklist

func (UnimplementedAutowpServer) DeleteFromTrafficWhitelist

func (UnimplementedAutowpServer) EmailChangeConfirm

func (UnimplementedAutowpServer) GetBrandIcons

func (UnimplementedAutowpServer) GetBrandVehicleTypes

func (UnimplementedAutowpServer) GetCommentVotes

func (UnimplementedAutowpServer) GetContact

func (UnimplementedAutowpServer) GetContacts

func (UnimplementedAutowpServer) GetForumsUserSummary

func (UnimplementedAutowpServer) GetIP

func (UnimplementedAutowpServer) GetMessagesNewCount

func (UnimplementedAutowpServer) GetMessagesSummary

func (UnimplementedAutowpServer) GetPerspectivePages

func (UnimplementedAutowpServer) GetPerspectives

func (UnimplementedAutowpServer) GetReCaptchaConfig

func (UnimplementedAutowpServer) GetSpecs

func (UnimplementedAutowpServer) GetTrafficTop

func (UnimplementedAutowpServer) GetTrafficWhitelist

func (UnimplementedAutowpServer) GetVehicleTypes

func (UnimplementedAutowpServer) PasswordRecovery

func (UnimplementedAutowpServer) PasswordRecoveryCheckCode

type UnsafeAutowpServer

type UnsafeAutowpServer interface {
	// contains filtered or unexported methods
}

UnsafeAutowpServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AutowpServer will result in compilation errors.

type User

type User struct {
	Id         int32                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name       string                 `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Deleted    bool                   `protobuf:"varint,3,opt,name=deleted,proto3" json:"deleted,omitempty"`
	LongAway   bool                   `protobuf:"varint,4,opt,name=long_away,json=longAway,proto3" json:"long_away,omitempty"`
	Green      bool                   `protobuf:"varint,5,opt,name=green,proto3" json:"green,omitempty"`
	Route      []string               `protobuf:"bytes,6,rep,name=route,proto3" json:"route,omitempty"`
	Identity   string                 `protobuf:"bytes,7,opt,name=identity,proto3" json:"identity,omitempty"`
	Avatar     string                 `protobuf:"bytes,8,opt,name=avatar,proto3" json:"avatar,omitempty"`
	Gravatar   string                 `protobuf:"bytes,9,opt,name=gravatar,proto3" json:"gravatar,omitempty"`
	LastOnline *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=last_online,json=lastOnline,proto3" json:"last_online,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAvatar

func (x *User) GetAvatar() string

func (*User) GetDeleted

func (x *User) GetDeleted() bool

func (*User) GetGravatar

func (x *User) GetGravatar() string

func (*User) GetGreen

func (x *User) GetGreen() bool

func (*User) GetId

func (x *User) GetId() int32

func (*User) GetIdentity

func (x *User) GetIdentity() string

func (*User) GetLastOnline

func (x *User) GetLastOnline() *timestamppb.Timestamp

func (*User) GetLongAway

func (x *User) GetLongAway() bool

func (*User) GetName

func (x *User) GetName() string

func (*User) GetRoute

func (x *User) GetRoute() []string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserExtractor

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

func NewUserExtractor

func NewUserExtractor(container *Container) *UserExtractor

func (*UserExtractor) Extract

func (s *UserExtractor) Extract(row *DBUser, fields map[string]bool) (*User, error)

type UserRepository

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

UserRepository Main Object

func NewUserRepository

func NewUserRepository(
	autowpDB *sql.DB,
	usersSalt string,
	emailSalt string,
	languages map[string]LanguageConfig,
	emailSender EmailSender,
	keyCloak gocloak.GoCloak,
	keyCloakConfig KeyCloakConfig,
) (*UserRepository, error)

NewUserRepository constructor

func (*UserRepository) CreateUser

func (s *UserRepository) CreateUser(options CreateUserOptions) (int64, error)

func (*UserRepository) EmailChangeFinish

func (s *UserRepository) EmailChangeFinish(code string) error

func (*UserRepository) GetLogin

func (s *UserRepository) GetLogin(userID int64) (string, error)

func (*UserRepository) GetUser

func (s *UserRepository) GetUser(options GetUsersOptions) (*DBUser, error)

func (*UserRepository) GetUserAvgVote

func (s *UserRepository) GetUserAvgVote(userId int64) (float64, error)

func (*UserRepository) GetUsers

func (s *UserRepository) GetUsers(options GetUsersOptions) ([]DBUser, error)

func (*UserRepository) RefreshUserConflicts

func (s *UserRepository) RefreshUserConflicts(userId int64) error

func (*UserRepository) SetPassword

func (s *UserRepository) SetPassword(userID int64, password string) error

func (*UserRepository) UpdateUserVoteLimit

func (s *UserRepository) UpdateUserVoteLimit(userId int64) error

func (*UserRepository) ValidateCreateUser

func (s *UserRepository) ValidateCreateUser(options CreateUserOptions, captchaEnabled bool, ip string) ([]*errdetails.BadRequest_FieldViolation, error)

type VehicleType

type VehicleType struct {
	Id     int32          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name   string         `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Childs []*VehicleType `protobuf:"bytes,4,rep,name=childs,proto3" json:"childs,omitempty"`
	// contains filtered or unexported fields
}

func (*VehicleType) Descriptor deprecated

func (*VehicleType) Descriptor() ([]byte, []int)

Deprecated: Use VehicleType.ProtoReflect.Descriptor instead.

func (*VehicleType) GetChilds

func (x *VehicleType) GetChilds() []*VehicleType

func (*VehicleType) GetId

func (x *VehicleType) GetId() int32

func (*VehicleType) GetName

func (x *VehicleType) GetName() string

func (*VehicleType) ProtoMessage

func (*VehicleType) ProtoMessage()

func (*VehicleType) ProtoReflect

func (x *VehicleType) ProtoReflect() protoreflect.Message

func (*VehicleType) Reset

func (x *VehicleType) Reset()

func (*VehicleType) String

func (x *VehicleType) String() string

type VehicleTypeItems

type VehicleTypeItems struct {
	Items []*VehicleType `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*VehicleTypeItems) Descriptor deprecated

func (*VehicleTypeItems) Descriptor() ([]byte, []int)

Deprecated: Use VehicleTypeItems.ProtoReflect.Descriptor instead.

func (*VehicleTypeItems) GetItems

func (x *VehicleTypeItems) GetItems() []*VehicleType

func (*VehicleTypeItems) ProtoMessage

func (*VehicleTypeItems) ProtoMessage()

func (*VehicleTypeItems) ProtoReflect

func (x *VehicleTypeItems) ProtoReflect() protoreflect.Message

func (*VehicleTypeItems) Reset

func (x *VehicleTypeItems) Reset()

func (*VehicleTypeItems) String

func (x *VehicleTypeItems) String() string

type Whitelist

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

Whitelist Main Object

func NewWhitelist

func NewWhitelist(db *pgxpool.Pool) (*Whitelist, error)

NewWhitelist constructor

func (*Whitelist) Add

func (s *Whitelist) Add(ip net.IP, desc string) error

Add IP to whitelist

func (*Whitelist) Exists

func (s *Whitelist) Exists(ip net.IP) (bool, error)

Exists whitelist already contains IP

func (*Whitelist) Get

func (s *Whitelist) Get(ip net.IP) (*WhitelistItem, error)

Get whitelist item

func (*Whitelist) List

func (s *Whitelist) List() ([]*APITrafficWhitelistItem, error)

List whitelist items

func (*Whitelist) MatchAuto

func (s *Whitelist) MatchAuto(ip net.IP) (bool, string)

MatchAuto MatchAuto

func (*Whitelist) Remove

func (s *Whitelist) Remove(ip net.IP) error

Remove IP from whitelist

type WhitelistItem

type WhitelistItem struct {
	IP          net.IP `json:"ip"`
	Description string `json:"description"`
}

WhitelistItem WhitelistItem

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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