Documentation
¶
Index ¶
- type CryptoService
- type FormService
- func (f *FormService) CheckCodeAvailability(code string) bool
- func (f *FormService) Create(formRequest *models.FormRequest, user *models.User) (*models.Form, error)
- func (f *FormService) GetByCode(code string, user *models.User) (*models.Form, error)
- func (f *FormService) GetForUser(user *models.User) ([]models.Form, error)
- func (f *FormService) GetWithResponses(formID string, user *models.User) (*models.Form, error)
- type ResponseService
- type UserService
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptoService ¶
type CryptoService struct {
// contains filtered or unexported fields
}
func NewCryptoService ¶
func NewCryptoService(cfg config.CryptoConfig) *CryptoService
func (*CryptoService) Base64Encode ¶
func (c *CryptoService) Base64Encode(data []byte) string
convert a byte slice to a base64 encoded string
type FormService ¶
type FormService struct {
// contains filtered or unexported fields
}
func NewFormService ¶
func (*FormService) CheckCodeAvailability ¶
func (f *FormService) CheckCodeAvailability(code string) bool
check if the form code is available
func (*FormService) Create ¶
func (f *FormService) Create(formRequest *models.FormRequest, user *models.User) (*models.Form, error)
create a new form using the form request for the user
func (*FormService) GetForUser ¶
get all forms for the user
func (*FormService) GetWithResponses ¶
get user owned form with its responses
type ResponseService ¶
type ResponseService struct {
// contains filtered or unexported fields
}
func NewResponseService ¶
func (*ResponseService) Create ¶
func (r *ResponseService) Create(responseRequest models.ResponseRequest, formID uuid.UUID, user *models.User) (models.Response, error)
func (*ResponseService) GetByFormID ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(cfg config.Config, db *database.Database) *UserService
func (*UserService) Create ¶
func (s *UserService) Create(userReq models.UserRequest) (*models.User, error)
create a new user using the user request
func (*UserService) GetByPubKey ¶
func (s *UserService) GetByPubKey(pubKey string) (*models.User, error)
get a user by their public key
Click to show internal directories.
Click to hide internal directories.