Documentation
¶
Index ¶
- type AccessToken
- type AuthSession
- type AuthSessionHandler
- type AuthSessionRepository
- type AuthSessionService
- type Client
- type ClientHandler
- type ClientPIC
- type ClientPICResponse
- type ClientRepository
- type ClientResponse
- type ClientService
- type LoginRequest
- type Navigation
- type NavigationChild
- type NavigationHandler
- type NavigationRepository
- type NavigationService
- type PIC
- type PICHandler
- type PICRepository
- type PICResponse
- type PICService
- type Permission
- type PermissionHandler
- type PermissionRepository
- type PermissionRole
- type PermissionRoleResponse
- type PermissionService
- type Project
- type ProjectDoc
- type ProjectHandler
- type ProjectRepository
- type ProjectResponse
- type ProjectService
- type RefreshToken
- type Role
- type RoleHandler
- type RoleRepository
- type RoleResponse
- type RoleService
- type SaveRequestClient
- type SaveRequestClientPIC
- type SaveRequestPIC
- type SaveRequestProject
- type SaveRequestProjectDoc
- type SaveRequestUser
- type TokenResponse
- type UpdateRequestClient
- type UpdateRequestClientPIC
- type UpdateRequestPIC
- type UpdateRequestProject
- type UpdateRequestUser
- type User
- type UserHandler
- type UserRepository
- type UserResponse
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AuthSession ¶
type AuthSessionHandler ¶
type AuthSessionHandler interface { Login() http.HandlerFunc Logout() http.HandlerFunc GetAccessToken() http.HandlerFunc }
type AuthSessionRepository ¶
type AuthSessionService ¶
type AuthSessionService interface { Login(ctx context.Context, request *LoginRequest, userAgent string) TokenResponse Logout(ctx context.Context, claims jwt.MapClaims, userAgent string) GetAccessToken(ctx context.Context, claims jwt.MapClaims, userAgent string) TokenResponse }
type ClientHandler ¶
type ClientHandler interface { SaveClient() http.HandlerFunc UpdateClient() http.HandlerFunc GetClients() http.HandlerFunc GetClientsWithPagination() http.HandlerFunc GetClient() http.HandlerFunc DeleteClient() http.HandlerFunc }
type ClientPICResponse ¶
type ClientRepository ¶
type ClientRepository interface { SaveClient(ctx context.Context, tx *sql.Tx, data *Client) SaveClientPIC(ctx context.Context, tx *sql.Tx, data *[]ClientPIC) UpdateClient(ctx context.Context, tx *sql.Tx, data *Client) UpdateClientPIC(ctx context.Context, tx *sql.Tx, data *[]ClientPIC) GetClients(ctx context.Context, tx *sql.Tx) *[]Client GetClientsWithPagination(ctx context.Context, tx *sql.Tx, params *helper.PaginationParams) *[]Client GetClient(ctx context.Context, tx *sql.Tx, id string) (*Client, error) GetClientPIC(ctx context.Context, tx *sql.Tx, id string) *[]ClientPIC DeleteClient(ctx context.Context, tx *sql.Tx, id string) DeleteClientPIC(ctx context.Context, tx *sql.Tx, IDClient string, id []int) }
type ClientResponse ¶
type ClientService ¶
type ClientService interface { SaveClient(ctx context.Context, request *SaveRequestClient) ClientResponse UpdateClient(ctx context.Context, request *UpdateRequestClient) ClientResponse GetClients(ctx context.Context) []ClientResponse GetClientsWithPagination(ctx context.Context, params *helper.PaginationParams) []ClientResponse GetClient(ctx context.Context, id string) ClientResponse DeleteClient(ctx context.Context, id string) }
type LoginRequest ¶
type Navigation ¶
type Navigation struct {}
type NavigationChild ¶
type NavigationChild struct {}
type NavigationHandler ¶
type NavigationHandler interface {
}type NavigationRepository ¶
type NavigationRepository interface {
}type NavigationService ¶
type NavigationService interface {
}type PICHandler ¶
type PICHandler interface { SavePIC() http.HandlerFunc UpdatePIC() http.HandlerFunc GetPICs() http.HandlerFunc GetPICsWithPagination() http.HandlerFunc GetPIC() http.HandlerFunc DeletePIC() http.HandlerFunc }
type PICRepository ¶
type PICRepository interface { SavePIC(ctx context.Context, tx *sql.Tx, data *PIC) UpdatePIC(ctx context.Context, tx *sql.Tx, data *PIC) GetPICs(ctx context.Context, tx *sql.Tx) *[]PIC GetPICsWithPagination(ctx context.Context, tx *sql.Tx, params *helper.PaginationParams) *[]PIC GetPIC(ctx context.Context, tx *sql.Tx, id string) (*PIC, error) DeletePIC(ctx context.Context, tx *sql.Tx, id string) }
type PICResponse ¶
type PICService ¶
type PICService interface { SavePIC(ctx context.Context, request *SaveRequestPIC) PICResponse UpdatePIC(ctx context.Context, request *UpdateRequestPIC) PICResponse GetPICs(ctx context.Context) []PICResponse GetPICsWithPagination(ctx context.Context, params *helper.PaginationParams) []PICResponse GetPIC(ctx context.Context, id string) PICResponse DeletePIC(ctx context.Context, id string) }
type Permission ¶
type PermissionHandler ¶
type PermissionHandler interface{}
type PermissionRepository ¶
type PermissionRole ¶
type PermissionRoleResponse ¶
type PermissionService ¶
type PermissionService interface {
GetRolePermissionsByID(ctx context.Context, id int) []PermissionRoleResponse
}
type ProjectDoc ¶
type ProjectHandler ¶
type ProjectHandler interface { SaveProject() http.HandlerFunc UpdateProject() http.HandlerFunc GetProjects() http.HandlerFunc GetProject() http.HandlerFunc SaveCloseProject() http.HandlerFunc UpdateCloseProject() http.HandlerFunc GetCloseProjects() http.HandlerFunc GetCloseProject() http.HandlerFunc }
type ProjectRepository ¶
type ProjectRepository interface { SaveProject(ctx context.Context, tx *sql.Tx, data *Project) UpdateProject(ctx context.Context, tx *sql.Tx, data *Project) GetProjects(ctx context.Context, tx *sql.Tx) *[]Project GetProject(ctx context.Context, tx *sql.Tx, id string) (*Project, error) SaveCloseProject(ctx context.Context, tx *sql.Tx, data *Project) SaveCloseProjectDoc(ctx context.Context, tx *sql.Tx, data *[]ProjectDoc) UpdateCloseProject(ctx context.Context, tx *sql.Tx, data *Project) UpdateCloseProjectDoc(ctx context.Context, tx *sql.Tx, data *[]ProjectDoc) GetCloseProjects(ctx context.Context, tx *sql.Tx) *[]Project GetCloseProject(ctx context.Context, tx *sql.Tx, id string) (*Project, error) GetCloseProjectDoc(ctx context.Context, tx *sql.Tx, id string) *[]ProjectDoc DeleteCloseProjectDoc(ctx context.Context, tx *sql.Tx, IDProject string, id []int) }
type ProjectResponse ¶
type ProjectService ¶
type ProjectService interface { SaveProject(ctx context.Context, request *SaveRequestProject) ProjectResponse UpdateProject(ctx context.Context, request *UpdateRequestProject) ProjectResponse GetProjects(ctx context.Context) []ProjectResponse GetProject(ctx context.Context, id string) ProjectResponse SaveCloseProject(ctx context.Context) UpdateCloseProject(ctx context.Context) GetCloseProjects(ctx context.Context) GetCloseProject(ctx context.Context) }
type RefreshToken ¶
type RoleHandler ¶
type RoleHandler interface{}
type RoleRepository ¶
type RoleResponse ¶
type RoleService ¶
type RoleService interface {
GetRoleByID(ctx context.Context, id string) RoleResponse
}
type SaveRequestClient ¶
type SaveRequestClient struct { Name string `json:"name" validate:"required,min=1,max=50"` Address string `json:"address" validate:"required,min=1,max=100"` Phone string `json:"phone" validate:"required,min=11,max=13"` ClientPIC []SaveRequestClientPIC `json:"client_pic" validate:"required,minclientpic,dive"` }
type SaveRequestClientPIC ¶
type SaveRequestPIC ¶
type SaveRequestProject ¶
type SaveRequestProject struct { IDClient string `json:"id_client" validate:"required,min=1,max=14"` IDClientPIC int `json:"id_client_pic" validate:"required"` Description string `json:"description" validate:"required,min=1,max=250"` ProjectType string `json:"project_type" validate:"required,min=1,max=20"` }
type SaveRequestProjectDoc ¶
type SaveRequestUser ¶
type SaveRequestUser struct { Username string `json:"username" validate:"required,min=1,max=50"` Email string `json:"email" validate:"required,email,min=1,max=50"` Password string `json:"password" validate:"required,min=1,max=50"` PasswordConfirmation string `json:"password_confirmation" validate:"required,eqfield=Password"` Name string `json:"name" validate:"required,min=1,max=50"` Phone string `json:"phone" validate:"required,min=1,max=13"` IDRole int `json:"id_role" validate:"required"` IDMenuGroup string `json:"id_menu_group"` }
type TokenResponse ¶
type TokenResponse struct { AccessToken AccessToken `json:"access_token"` RefreshToken RefreshToken `json:"refresh_token"` }
type UpdateRequestClient ¶
type UpdateRequestClient struct { ID string `json:"id" validate:"required"` Name string `json:"name" validate:"required,min=1,max=50"` Address string `json:"address" validate:"required,min=1,max=100"` Phone string `json:"phone" validate:"required,min=11,max=13"` ClientPIC []UpdateRequestClientPIC `json:"client_pic" validate:"required,minclientpic,dive"` }
type UpdateRequestClientPIC ¶
type UpdateRequestClientPIC struct { ID int `json:"id"` IDClient string `json:"id_client"` Name string `json:"name" validate:"required,min=1,max=50"` Email string `json:"email" validate:"required,email,min=1,max=50"` Phone string `json:"phone" validate:"required,min=1,max=13"` Address string `json:"address" validate:"required,min=1,max=100"` }
type UpdateRequestPIC ¶
type UpdateRequestProject ¶
type UpdateRequestProject struct { ID string `json:"id" validate:"required"` IDClient string `json:"id_client" validate:"required,min=1,max=14"` IDClientPIC int `json:"id_client_pic" validate:"required"` Description string `json:"description" validate:"required,min=1,max=250"` ProjectType string `json:"project_type" validate:"required,min=1,max=20"` }
type UpdateRequestUser ¶
type UserHandler ¶
type UserHandler interface { GetUserByToken() http.HandlerFunc GetUserPhotoProfile() http.HandlerFunc SaveUser() http.HandlerFunc UpdateProfilePhotoUser() http.HandlerFunc UpdateUser() http.HandlerFunc }
type UserRepository ¶
type UserRepository interface { GetUserByEmail(ctx context.Context, tx *sql.Tx, email string) (*User, error) GetUserByUsername(ctx context.Context, tx *sql.Tx, username string) (*User, error) GetUserByID(ctx context.Context, tx *sql.Tx, id string) (*User, error) SaveUser(ctx context.Context, tx *sql.Tx, data *User) UpdateProfilePhotoUser(ctx context.Context, tx *sql.Tx, data *User) UpdateUser(ctx context.Context, tx *sql.Tx, data *User) }
type UserResponse ¶
type UserResponse struct { ID string `json:"id"` Username string `json:"username"` Password string `json:"-"` Email string `json:"email"` Name string `json:"name"` Phone string `json:"phone"` IDRole int `json:"id_role"` IDMenuGroup string `json:"id_menu_group"` StatusActive bool `json:"status_active"` Avatar string `json:"avatar"` }
type UserService ¶
type UserService interface { GetUserByEmail(ctx context.Context, email string) UserResponse GetUserByUsername(ctx context.Context, username string) UserResponse GetUserByID(ctx context.Context, id string) UserResponse SaveUser(ctx context.Context, request *SaveRequestUser) UserResponse UpdateProfilePhotoUser(ctx context.Context, fileName string, claims jwt.MapClaims) UserResponse UpdateUser(ctx context.Context, request *UpdateRequestUser, claims jwt.MapClaims) UserResponse }
Click to show internal directories.
Click to hide internal directories.