api

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DescriptedString

type DescriptedString struct {
	Value       string `json:"value"`
	Description string `json:"description"`
}

DescriptedString : a struct containing a string and its localized description.

type DescriptedValue

type DescriptedValue struct {
	Value       int    `json:"value"`
	Description string `json:"description"`
}

DescriptedValue : a struct containing a value and its localized description.

type Handlers

type Handlers struct {
	RecurringTasks                                                func()
	NewMessageFromQueueCache                                      func(message string) bool
	MiddlewareIsValidAuthToken                                    context.IsAuthTokenValidFunc
	MiddlewareGetUserAndLocaleFromAuthToken                       context.GetUserAndLocaleFromAuthTokenFunc
	MiddlewareGetUserAbilities                                    rights.GetUserAbilitesFunc
	MiddlewareGetLatestVersionOfTermsAcceptedByUser               context.GetLatestVersionOfTermsAcceptedByUserFunc
	BuildTokenFromID                                              authentication.BuildTokenFunc
	ExtraPropertiesForTokenWithID                                 authentication.ExtraPropertiesForTokenWithIDFunc
	ExtendTokenExpirationDateFromID                               authentication.ExtendTokenExpirationDateFunc
	RouterConfigureDefaultRoutes                                  route.ConfigureDefaultRoutes
	UpdateVersionOfTermsAcceptedByUser                            terms.UpdateVersionOfTermsAcceptedByUserFunc
	GetEnabledUsersForAdmin                                       user.GetUsersForAdminFunc
	GetDisabledUsersForAdmin                                      user.GetUsersForAdminFunc
	UpdatePasswordByAdmin                                         user.UpdatePasswordByAdminFunc
	UpdateInformationsByAdmin                                     user.UpdateInformationsByAdminFunc
	UpdateDescriptionByAdmin                                      user.UpdateDescriptionByAdminFunc
	UpdateSocialByAdmin                                           user.UpdateSocialByAdminFunc
	UpdateSettingsByAdmin                                         user.UpdateSettingsByAdminFunc
	UpdateNotificationsByAdmin                                    user.UpdateNotificationsByAdminFunc
	GetTokensForAdmin                                             user.GetTokensForAdminFunc
	DeleteTokenByIDByAdmin                                        user.DeleteTokenByIDByAdminFunc
	SetAbilitiesToUser                                            user.SetAbilitiesToUserFunc
	AddAbilitiesToUser                                            user.AddAbilitiesToUserFunc
	RemoveAbilitiesFromUser                                       user.RemoveAbilitiesFromUserFunc
	NotificationsReceivedByUser                                   account.NotificationsReceivedByUserFunc
	NotificationReceivedByUser                                    account.NotificationReceivedByUserFunc
	UpdateUserNotificationRead                                    account.UpdateUserNotificationReadFunc
	UpdateUserNotificationNotified                                account.UpdateUserNotificationNotifiedFunc
	DeleteUserNotification                                        account.DeleteUserNotificationFunc
	NotificationsSubscribedByUser                                 account.NotificationsSubscribedByUserFunc
	SubscribeNotificationsToUser                                  account.SubscribeNotificationsToUserFunc
	UnsubscribeNotificationFromUser                               account.UnsubscribeNotificationFromUserFunc
	GetUserDetailsByIdentifier                                    account.GetUserDetailsByIdentifierFunc
	GetUserDetailsByID                                            account.GetUserDetailsByIDFunc
	NewForgotPasswordProcessForUser                               account.NewForgotPasswordProcessForUserFunc
	GetForgotPasswordProcessDetailsByID                           account.GetForgotPasswordProcessDetailsByIDFunc
	WrongAccessToForgotPasswordProcess                            account.WrongAccessToForgotPasswordProcessFunc
	UpdateUserPassword                                            account.UpdateUserPasswordFunc
	UpdateUserEmailAddress                                        account.UpdateUserEmailAddressFunc
	UserEmailAddressIsVerified                                    account.UserEmailAddressIsVerifiedFunc
	UpdateUserSocialNetworks                                      account.UpdateUserSocialNetworksFunc
	DeleteForgotPasswordProcess                                   account.DeleteForgotPasswordProcessFunc
	ValidateUserRegistration                                      account.ValidateUserRegistrationFunc
	CancelUserRegistration                                        account.CancelUserRegistrationFunc
	GetRegistrationDetails                                        account.GetRegistrationDetailsFunc
	SaveAuthenticationToken                                       account.SaveAuthenticationTokenFunc
	DoesAccountWithUsernameExist                                  account.DoesAccountWithUsernameExistFunc
	DoesAccountWithEmailAddressExist                              account.DoesAccountWithEmailAddressExistFunc
	RegisterByEmailAddress                                        account.RegisterByEmailAddressFunc
	RegisterByThirdPartyToken                                     account.RegisterByThirdPartyTokenFunc
	DoesUserWithFacebookUserIDExist                               account.DoesUserWithSocialNetworkUserIDExistFunc
	DoesUserWithGoogleUserIDExist                                 account.DoesUserWithSocialNetworkUserIDExistFunc
	GetUserDetailsByFacebookUserID                                account.GetUserDetailsBySocialNetworkIDFunc
	GetUserDetailsByGoogleUserID                                  account.GetUserDetailsBySocialNetworkIDFunc
	SaveFacebookUserTokenDetailsToUser                            account.SaveSocialNetworkUserTokenDetailsToUserFunc
	SaveGoogleUserTokenDetailsToUser                              account.SaveSocialNetworkUserTokenDetailsToUserFunc
	GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUser account.GetUserDetailsAndEncryptedPasswordByIdentifierFromEnabledUserFunc
	GetTokenExpirationDate                                        account.GetTokenExpirationDateFunc
	DeleteTokenByID                                               account.DeleteTokenByIDFunc
	GetTokenDetailsByID                                           account.GetTokenDetailsByIDFunc
	GetOwnedTokens                                                account.GetOwnedTokensFunc
	GetOwnedTokenByID                                             account.GetOwnedTokenByIDFunc
	UpdateTokenByID                                               account.UpdateTokenByIDFunc
	GetOwnedAccountDetails                                        account.GetOwnedAccountDetailsFunc
	UpdatedAccountInfos                                           account.UpdatedAccountInfosFunc
	UpdatedAccountSettings                                        account.UpdatedAccountSettingsFunc
	CreateNewDeleteAccountProcess                                 account.CreateNewProcessFunc
	CreateNewDisableAccountProcess                                account.CreateNewProcessFunc
	CreateNewUpdatePasswordProcess                                account.CreateNewProcessWithValueFunc
	CreateNewUpdateEmailAddressProcess                            account.CreateNewProcessWithValueFunc
	CreateNewVerifyEmailAddressProcess                            account.CreateNewProcessFunc
	VerifyProcess                                                 account.VerifyProcessFunc
	DeleteProcessByID                                             account.DeleteProcessByIDFunc
	DeleteUserByID                                                account.DeleteUserByIDFunc
	DisableUserByID                                               account.DisableUserByIDFunc
	EnableUserByID                                                account.EnableUserByIDFunc
	CreateContact                                                 contact.CreateContactFunc
	UpdateContact                                                 contact.UpdateContactFunc
	GetContacts                                                   contact.GetContactsFunc
	GetContact                                                    contact.GetContactFunc
}

Handlers : list of the functions of an API.

type Server

type Server struct {
	RoutesFile string
	Functions  Handlers
	// contains filtered or unexported fields
}

Server : definition of an API server.

func NewServer

func NewServer() *Server

NewServer : returns a new struct 'Server'.

func (*Server) AddCustomRoutes

func (s *Server) AddCustomRoutes(configuration route.ConfigureCustomRoutes)

AddCustomRoutes : adds some suctom routes.

func (*Server) CreateKafkaConsumers

func (s *Server) CreateKafkaConsumers() []kafka.MessageConsumer

CreateKafkaConsumers : returns an array of kafka consumers.

func (*Server) Start

func (s *Server) Start()

Start : starts the worker.

Jump to

Keyboard shortcuts

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