Documentation ¶
Index ¶
- Constants
- Variables
- type AccountSubmission
- type AdditionalInformation
- type AdditionalInformationDetail
- type AdditionalInformationRepository
- type AggDomain
- type Application
- type ApplicationDetail
- type ApplicationRepository
- type Area
- type AreaListResponse
- type AreaRepository
- type AreaUsecase
- type AuthUsecase
- type Author
- type Award
- type AwardCategoryAggregation
- type AwardRepository
- type AwardUsecase
- type Cache
- type Category
- type CategoryRepository
- type CategoryUsecase
- type ChangePasswordRequest
- type CheckNipExistRequest
- type CheckPasswordRequest
- type CounterVisitor
- type CounterVisitorResponse
- type CoverPublication
- type CustomButtonlabel
- type CustomMetaData
- type DataTag
- type DataTagRepository
- type DefaultInformation
- type DeleteMediaRequest
- type DetailAdditionalInformation
- type DetailDefaultInformation
- type DetailEventResponse
- type DetailGeneralInformation
- type DetailMasterDataServiceResponse
- type DetailMetaDataImage
- type DetailNewsResponse
- type DetailPopUpBannerResponse
- type DetailPublicServiceResponse
- type DetailPublicationPortalResponse
- type DetailPublicationResponse
- type DetailServiceDescription
- type DetailServicePublicResponse
- type District
- type DistrictRepository
- type DistrictUsecase
- type DocumentArchive
- type DocumentArchiveRepository
- type DocumentArchiveRequest
- type DocumentArchiveUsecase
- type ErrResponse
- type ErrorResults
- type Event
- type EventRepository
- type EventUsecase
- type ExternalCounterVisitor
- type ExternalVisitorRepository
- type FAQ
- type Facility
- type FacilityService
- type FeaturedProgram
- type FeaturedProgramRepository
- type FeaturedProgramUsecase
- type FeaturesMds
- type Feedback
- type FeedbackRepository
- type FeedbackUsecase
- type GeneralInformation
- type GeneralInformationRepository
- type GeneralInformationUsecase
- type GovernmentAffair
- type GovernmentAffairRepository
- type GovernmentAffairUsecase
- type ImageBanner
- type ImageMetaDataBanner
- type InfoGraphic
- type InfographicBanner
- type InfographicBannerRepository
- type InfographicBannerResponse
- type InfographicBannerUsecase
- type Information
- type InformationRepository
- type InformationUsecase
- type Items
- type ItemsFacility
- type JSONStringSlices
- type JSiteGenerateTokenResponse
- type JwtCustomClaims
- type JwtCustomRefreshClaims
- type Link
- type LinkMds
- type ListDocumentArchive
- type ListEventCalendarReponse
- type ListEventResponse
- type ListInformation
- type ListMasterDataResponse
- type ListPopUpBannerResponse
- type ListPortalPublicationResponse
- type ListPublicServiceResponse
- type ListServicePublicResponse
- type LiveBannerResponse
- type LocationMds
- type LoginRequest
- type LoginResponse
- type Logo
- type LogoRepository
- type LogoUsecase
- type Mail
- type MailRepository
- type MainService
- type MainServiceDetail
- type MainServiceRepository
- type MasterDataPublication
- type MasterDataPublicationRepository
- type MasterDataPublicationUsecase
- type MasterDataPublicationUsecaseArgs
- type MasterDataService
- type MasterDataServiceEntityID
- type MasterDataServiceRepository
- type MasterDataServiceUsecase
- type MasterDataServiceUsecaseArgs
- type MdsApplication
- type MdsItemCovers
- type MdsItems
- type MdsObject
- type MdsObjectCover
- type MdsServiceFee
- type Media
- type MediaParamsRequest
- type MediaResponse
- type MediaUsecase
- type MessageResponse
- type MetaAggregations
- type MetaData
- type MetaDetailPopUpBannerResponse
- type News
- type NewsAptikaResponse
- type NewsBanner
- type NewsListResponse
- type NewsRepository
- type NewsUsecase
- type NullInt64
- type NullString
- type NullTime
- type OperationalHours
- type OperationalTimeMds
- type PopUpBanner
- type PopUpBannerRepository
- type PopUpBannerUsecase
- type PosterInfo
- type PubApplication
- type PublicService
- type PublicServiceRepository
- type PublicServiceUsecase
- type PublicationFAQ
- type PublicationInfographic
- type PublicationInformation
- type Purpose
- type QuestionAnswer
- type QuickAccess
- type QuickAccessRepository
- type QuickAccessResponse
- type QuickAccessUsecase
- type RefreshRequest
- type RegistrationInvitation
- type RegistrationInvitationClaim
- type RegistrationInvitationRepository
- type RegistrationInvitationUsecase
- type Request
- type Requirement
- type ResultData
- type ResultsData
- type Role
- type RoleInfo
- type RolePermissionRepository
- type RoleRepository
- type SchedulerPopUpBanner
- type Search
- type SearchListResponse
- type SearchRepository
- type SearchUsecase
- type ServiceDescription
- type ServicePublic
- type ServicePublicRepository
- type ServicePublicUsecase
- type SocialMedia
- type SocialMediaMds
- type SpbeRals
- type SpbeRalsRepository
- type SpbeRalsUsecase
- type StoreInfographicBanner
- type StoreLogoRequest
- type StoreMasterDataPublication
- type StoreMasterDataService
- type StoreNewsRequest
- type StorePopUpBannerRequest
- type StorePserviceRequest
- type StorePublicService
- type StoreQuickAccess
- type StoreRequestEvent
- type SuggestResponse
- type SyncSequence
- type TabStatusResponse
- type TabStatusResponseMds
- type Tag
- type TagRepository
- type TagUsecase
- type Template
- type TemplateRepository
- type TemplateUsecase
- type TermsOfService
- type Unit
- type UnitInfo
- type UnitRepository
- type UnitUsecase
- type UpdateNewsStatusRequest
- type UpdatePublicService
- type UpdateSequenceInfographicBanner
- type UpdateStatusDocumentArchiveRequest
- type UpdateStatusInfographicBanner
- type UpdateStatusPopUpBannerRequest
- type UpdateStatusQuickAccess
- type UptdCabdin
- type UptdCabdinRepository
- type UptdCabdinUsecase
- type User
- type UserInfo
- type UserListResponse
- type UserRepository
- type UserUsecase
- type VisitorUsecase
Constants ¶
const ( ArchiveStatus = "ARCHIVE" PublishStatus = "PUBLISH" MasterDataServiceModule = "MASTER-DATA-SERVICE" )
const ( PermissionManageNews = "news.manage" PermissionManageEvent = "event.manage" PermissionManageUser = "user.manage" PermissionInviteUser = "user.invite" PermissionSetAsAdmin = "user.set-as-admin" PermissionChangeEmail = "user.change-email" PermissionChangeStatus = "user.change-status" PermissionRequestToBeAdmin = "user.request-to-be-admin" )
const ( RoleSuperAdmin int8 = 1 RoleGroupAdmin int8 = 2 RoleAdministrator int8 = 3 RoleContributor int8 = 4 )
Constanta Role
const ( ActiveUser string = "ACTIVE" InactiveUser string = "INACTIVE" PendingUser string = "PENDING" )
Constanta User Status
const ConstEvent string = "event"
const ConstNews string = "news"
Variables ¶
var ( DocumentArchiveDraft string = "DRAFT" DocumentArchivePublished string = "PUBLISHED" DocumentArchiveArchived string = "ARCHIVED" )
var ( // ErrInternalServerError will throw if any the Internal Server Error happen ErrInternalServerError = errors.New("Internal Server Error") // ErrNotFound will throw if the requested item is not exists ErrNotFound = errors.New("Your requested Item is not found") // ErrConflict will throw if the current action already exists ErrConflict = errors.New("Your Item already exist") // ErrBadParamInput will throw if the given request-body or params is not valid ErrBadParamInput = errors.New("Given Param is not valid") // ErrInvalidCredentials ErrInvalidCredentials = errors.New("Invalid credentials") // ErrDuplicateNIP ErrDuplicateNIP = errors.New("NIP already exists") // ErrUserIsNotActive ErrUserIsNotActive = errors.New("Your account is not active") // Forbidden ErrForbidden = errors.New("You are not authorized to access this resource") // Has Publication ErrHasPublication = errors.New("Your requested master data is already used on publication") // ErrSlugAlreadyExist ErrSlugAlreadyExist = errors.New("Slug already exists") // Err for bad request ErrBadRequest = errors.New("Bad Request") )
var ( PortalExternalLink = "PORTAL-EXTERNAL-LINK" PortalDocumentArchive = "PORTAL-DOCUMENT-ARCHIVE" )
var (
AuthModule = "AUTH"
)
var (
DocumentArchiveModule = "DOCUMENT-ARCHIVE"
)
var (
EventModule = "EVENT"
)
var (
ExternalModule = "EXTERNAL"
)
var (
MasterDataPublicationModule = "MASTER-DATA-PUBLICATION"
)
var (
NewsModule = "NEWS"
)
var QuickAccessMaxActived = 8
var (
SearchModule = "SEARCH"
)
Functions ¶
This section is empty.
Types ¶
type AccountSubmission ¶
AccountSubmission ...
type AdditionalInformation ¶
type AdditionalInformation struct { ID int64 `json:"id"` ResponsibleName string `json:"responsible_name"` PhoneNumber string `json:"phone_number"` Email string `json:"email"` SocialMedia NullString `json:"social_media"` }
type AdditionalInformationDetail ¶
type AdditionalInformationDetail struct { ID int64 `json:"id"` ResponsibleName string `json:"responsible_name"` PhoneNumber string `json:"phone_number"` Email string `json:"email"` SocialMedia []SocialMediaMds `json:"social_media"` }
type AggDomain ¶
type AggDomain struct { News int64 `json:"news"` Information int64 `json:"information"` PublicService int64 `json:"public_service"` Announcement int64 `json:"announcement"` About int64 `json:"about"` }
AggDomain
type Application ¶
type Application struct { ID int64 `json:"id"` Name string `json:"name"` Status string `json:"status"` Title NullString `json:"title"` Features NullString `json:"features"` }
type ApplicationDetail ¶
type ApplicationDetail struct { ID int64 `json:"id"` Name string `json:"name"` Status string `json:"status"` Title string `json:"title"` Features []FeaturesMds `json:"features"` }
type ApplicationRepository ¶
type Area ¶
type Area struct { ID int64 `json:"id"` Depth NullString `json:"depth" validate:"required"` Name NullString `json:"name" validate:"required"` ParentCodeKemendagri NullString `json:"parent_code_kemendagri" validate:"required"` CodeKemendagri NullString `json:"code_kemendagri" validate:"required"` CodeBps NullString `json:"code_bps" validate:"required"` Latitude NullString `json:"latitude" validate:"required"` Longtitude NullString `json:"longtitude" validate:"required"` Meta NullString `json:"meta" validate:"required"` }
Area model ..
type AreaListResponse ¶
type AreaListResponse struct { ID int64 `json:"id"` Name NullString `json:"name"` CodeKemendagri NullString `json:"code_kemendagri"` }
AreaListResponse ...
type AreaRepository ¶
type AreaRepository interface { Fetch(ctx context.Context, params *Request) (new []Area, total int64, err error) GetByID(ctx context.Context, id int64) (Area, error) }
AreaRepository ..
type AreaUsecase ¶
AreaUsecase ..
type AuthUsecase ¶
type AuthUsecase interface { Login(ctx context.Context, req *LoginRequest) (LoginResponse, error) RefreshToken(ctx context.Context, req *RefreshRequest) (LoginResponse, error) JSiteGenerateToken(ctx context.Context, email string) (JSiteGenerateTokenResponse, error) GetPermissionsByRoleID(ctx context.Context, id int8) ([]string, error) }
AuthUsecase ...
type Award ¶
type Award struct { ID int64 `json:"id"` Title string `json:"title"` Logo NullString `json:"logo"` Appreciator string `json:"appreciator"` Description string `json:"description"` Category string `json:"category"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Award ...
type AwardCategoryAggregation ¶
Categories returns all categories
type AwardRepository ¶
type AwardRepository interface { Fetch(ctx context.Context, params *Request) (res []Award, total int64, err error) GetByID(ctx context.Context, id int64) (res Award, err error) FetchCategories(ctx context.Context) (res []AwardCategoryAggregation, err error) }
AwardRepository represent the award repository contract
type AwardUsecase ¶
type AwardUsecase interface { Fetch(ctx context.Context, params *Request) ([]Award, int64, error) GetByID(ctx context.Context, id int64) (Award, error) FetchCategories(ctx context.Context) ([]AwardCategoryAggregation, error) }
AwardUsecase represent the award usecases
type Cache ¶
type Cache struct { Data interface{} `json:"data"` Meta interface{} `json:"meta,omitempty"` }
struct for redis
type Category ¶
type Category struct { ID int64 `json:"id"` Title NullString `json:"title" validate:"required"` Description NullString `json:"description,omitempty"` Type NullString `json:"type" validate:"required"` }
Category ...
type CategoryRepository ¶
CategoryRepository ...
type CategoryUsecase ¶
CategoryUsecase ...
type ChangePasswordRequest ¶
type ChangePasswordRequest struct { CurrentPassword string `json:"current_password" validate:"required"` NewPassword string `json:"new_password" validate:"required"` }
ChangePasswordRequest ...
type CheckNipExistRequest ¶
type CheckNipExistRequest struct {
Nip *string `json:"nip" validate:"len=18"`
}
type CheckPasswordRequest ¶
type CounterVisitor ¶
type CounterVisitor struct { Online30mnt int `json:"online30mnt"` Visitor_today int `json:"visitor_today"` Visit_today int `json:"visit_today"` Visitor_yesterday int `json:"visitor_yesterday"` Visit_yesterday int `json:"visit_yesterday"` Visitor_all int `json:"visitor_all"` Visit_all int `json:"visit_all"` Growth_visitor int `json:"growth_visitor"` Growth_visit int `json:"growth_visit"` Last_update_pipeline int `json:"last_update_pipeline"` }
type CounterVisitorResponse ¶
type CounterVisitorResponse struct {
Data CounterVisitor `json:"data"`
}
type CoverPublication ¶
type CoverPublication struct { Video string `json:"video"` Image DetailMetaDataImage `json:"image"` }
type CustomButtonlabel ¶
type CustomMetaData ¶
type CustomMetaData struct { TotalCount int64 `json:"total_count"` // for dynamic count (this count affected by filters) LastUpdated string `json:"last_updated"` StaticCount int64 `json:"static_count,omitempty"` // for static count only }
CustomMetaData ..
type DataTag ¶
type DataTag struct { ID int64 `json:"id"` DataID int64 `json:"data_id"` TagID int64 `json:"tag_id"` TagName string `json:"tag_name"` Type string `json:"type"` }
DataTag ..
type DataTagRepository ¶
type DataTagRepository interface { FetchDataTags(ctx context.Context, id int64, domain string) ([]DataTag, error) StoreDataTag(ctx context.Context, dt *DataTag, tx *sql.Tx) error DeleteDataTag(ctx context.Context, id int64, domain string, tx *sql.Tx) error }
DataTagRepository ..
type DefaultInformation ¶
type DefaultInformation struct { MdsID int64 `json:"mds_id"` OpdName string `json:"opd_name"` ServiceForm string `json:"form"` ServiceName string `json:"name"` ProgramName string `json:"program_name"` Description string `json:"description"` ServiceUser string `json:"user"` PortalCategory string `json:"portal_category"` Logo NullString `json:"logo"` OperationalStatus string `json:"operational_status"` Technical string `json:"technical"` Benefits NullString `json:"benefits"` Facilities NullString `json:"facilities"` Website string `json:"website"` Slug string `json:"slug"` }
type DeleteMediaRequest ¶
type DetailAdditionalInformation ¶
type DetailAdditionalInformation struct { Keywords []string `json:"keywords"` FAQ PublicationFAQ `json:"faq"` }
type DetailDefaultInformation ¶
type DetailDefaultInformation struct { MdsID int64 `json:"mds_id"` OpdName string `json:"opd_name"` ServiceForm string `json:"service_form"` ServiceName string `json:"service_name"` ProgramName string `json:"program_name"` Description string `json:"description"` ServiceUser string `json:"service_user"` PortalCategory string `json:"portal_category"` Logo DetailMetaDataImage `json:"logo"` OperationalStatus string `json:"operator_status"` Technical string `json:"technical"` Benefits MdsObject `json:"benefits"` Facilities MdsObject `json:"facilities"` Website string `json:"website"` Slug string `json:"slug"` }
type DetailEventResponse ¶
type DetailEventResponse struct { ID int64 `json:"id"` Title string `json:"title"` Date time.Time `json:"date"` StartHour string `json:"start_hour"` EndHour string `json:"end_hour"` Type string `json:"type"` Status string `json:"status"` Address NullString `json:"address"` URL NullString `json:"url"` Category string `json:"category"` Tags []DataTag `json:"tags"` CreatedBy Author `json:"created_by"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type DetailGeneralInformation ¶
type DetailGeneralInformation struct { ID int64 `json:"id"` Name string `json:"name"` Alias string `json:"alias"` Description string `json:"description"` Slug string `json:"slug"` Category string `json:"category"` Addresses []string `json:"addresses"` Unit string `json:"unit"` Logo string `json:"logo"` Type string `json:"type"` Phone []string `json:"phone"` Email string `json:"email"` Link Link `json:"link"` OperationalHours []OperationalHours `json:"operational_hours"` Media Media `json:"media"` SocialMedia SocialMedia `json:"social_media"` }
type DetailMasterDataServiceResponse ¶
type DetailMasterDataServiceResponse struct { ID int64 `json:"id"` MainService MainServiceDetail `json:"services"` Application ApplicationDetail `json:"application"` AdditionalInformation AdditionalInformationDetail `json:"additional_information"` Status string `json:"status"` HasPublication int8 `json:"has_publication"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
type DetailMetaDataImage ¶
type DetailNewsResponse ¶
type DetailNewsResponse struct { ID int64 `json:"id"` Title string `json:"title"` Excerpt string `json:"excerpt"` Content string `json:"content"` Slug string `json:"slug"` Image *string `json:"image"` Video *string `json:"video"` Source *string `json:"source"` Status string `json:"status"` Views int64 `json:"views"` Highlight int8 `json:"highlight,omitempty"` Type string `json:"type"` Tags []DataTag `json:"tags"` Category string `json:"category"` Author string `json:"author"` Reporter string `json:"reporter"` Editor string `json:"editor"` Duration int8 `json:"duration"` StartDate *time.Time `json:"start_date"` EndDate *time.Time `json:"end_date"` Area *AreaListResponse `json:"area"` PublishedAt time.Time `json:"published_at"` CreatedBy Author `json:"created_by"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
DetailNewsResponse ...
func (DetailNewsResponse) MarshalBinary ¶
func (i DetailNewsResponse) MarshalBinary() ([]byte, error)
type DetailPopUpBannerResponse ¶
type DetailPopUpBannerResponse struct { ID int64 `json:"id"` Title string `json:"title"` ButtonLabel string `json:"button_label"` Image ImageBanner `json:"image,omitempty"` ImageMetaData ImageMetaDataBanner `json:"image_metadata,omitempty"` Link string `json:"link"` Status string `json:"status"` IsLive int8 `json:"is_live"` Duration int64 `json:"duration"` StartDate *time.Time `json:"start_date"` EndDate *time.Time `json:"end_date,omitempty"` UpdateAt time.Time `json:"updated_at"` }
type DetailPublicServiceResponse ¶
type DetailPublicServiceResponse struct { ID int64 `json:"id"` Name string `json:"name"` Description NullString `json:"description"` Excerpt NullString `json:"excerpt"` Unit NullString `json:"unit"` Url NullString `json:"url"` Category NullString `json:"category"` IsActive NullString `json:"is_active"` Slug NullString `json:"slug"` ServiceType NullString `json:"service_type"` Video NullString `json:"video"` Logo NullString `json:"logo"` Website NullString `json:"website"` SocialMedia SocialMedia `json:"social_media"` Images JSONStringSlices `json:"images"` Purposes JSONStringSlices `json:"purposes"` Facilities []Facility `json:"facilities"` Info PosterInfo `json:"info"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
PublicService ...
type DetailPublicationPortalResponse ¶
type DetailPublicationPortalResponse struct { ID int64 `json:"id"` OpdName string `json:"opd_name"` Logo DetailMetaDataImage `json:"logo"` PortalCategory string `json:"portal_category"` ServiceName string `json:"service_name"` ProgramName string `json:"program_name"` Description string `json:"description"` ServiceForm string `json:"service_form"` ServiceUser string `json:"service_user"` OperationalStatus string `json:"operator_status"` Technical string `json:"technical"` Cover CoverPublication `json:"cover"` Images []DetailMetaDataImage `json:"images"` HotlineNumber string `json:"hotline_number"` HotlineMail string `json:"hotline_mail"` OperationalTimes []OperationalTimeMds `json:"operational_times"` ServiceFee MdsServiceFee `json:"service_fee"` Website string `json:"website"` Locations []LocationMds `json:"locations"` Links []LinkMds `json:"links"` SocialMedia []SocialMediaMds `json:"social_media"` Benefits MdsObject `json:"benefits"` Facilities MdsObject `json:"facilities"` TermsAndConditions MdsObjectCover `json:"terms_and_conditions"` ServiceProcedures MdsObjectCover `json:"service_procedures"` InfoGraphics PublicationInfographic `json:"infographics"` FAQ PublicationFAQ `json:"faq"` Application MdsApplication `json:"application"` ContentImages []DetailMetaDataImage `json:"content_images"` Keywords []string `json:"keywords"` UpdatedAt time.Time `json:"updated_at"` }
type DetailPublicationResponse ¶
type DetailPublicationResponse struct { ID int64 `json:"id"` DefaultInformation DetailDefaultInformation `json:"default_information"` ServiceDescription DetailServiceDescription `json:"service_description"` AdditionalInformation DetailAdditionalInformation `json:"additional_information"` Status string `json:"status"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
type DetailServiceDescription ¶
type DetailServiceDescription struct { Cover CoverPublication `json:"cover"` Images []DetailMetaDataImage `json:"images"` TermsAndConditions MdsObjectCover `json:"terms_and_conditions"` ServiceProcedures MdsObjectCover `json:"service_procedures"` ServiceFee MdsServiceFee `json:"service_fee"` OperationalTimes []OperationalTimeMds `json:"operational_times"` HotlineNumber string `json:"hotline_number"` HotlineMail string `json:"hotline_mail"` InfoGraphics PublicationInfographic `json:"infographics"` Locations []LocationMds `json:"locations"` Application MdsApplication `json:"application"` Links []LinkMds `json:"links"` SocialMedia []SocialMediaMds `json:"social_media"` }
type DetailServicePublicResponse ¶
type DetailServicePublicResponse struct { ID int64 `json:"id"` GeneralInformation DetailGeneralInformation `json:"general_information"` Purpose Purpose `json:"purpose"` Facility FacilityService `json:"facility"` Requirement Requirement `json:"requirement"` ToS TermsOfService `json:"terms_of_service"` InfoGraphic InfoGraphic `json:"infographic"` FAQ FAQ `json:"faq"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type District ¶
type District struct { ID int64 `json:"id"` Name string `json:"name"` Chief string `json:"chief"` Address string `json:"address"` Website string `json:"website"` Logo NullString `json:"logo"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
District ...
type DistrictRepository ¶
type DistrictRepository interface {
Fetch(ctx context.Context, params *Request) ([]District, int64, error)
}
District Repository ...
type DistrictUsecase ¶
type DistrictUsecase interface {
Fetch(ctx context.Context, params *Request) ([]District, int64, error)
}
District Usecase ...
type DocumentArchive ¶
type DocumentArchive struct { ID int64 `json:"id"` Title string `json:"title" validate:"required"` Excerpt string `json:"excerpt" validate:"required"` Description string `json:"description" validate:"required"` Source string `json:"source"` Mimetype string `json:"mimetype"` Status string `json:"status"` Category string `json:"category" validate:"required"` IsCompleted bool `json:"is_completed"` CreatedBy User `json:"created_by"` UpdatedBy User `json:"updated_by"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
DocumentArchive Struct ...
type DocumentArchiveRepository ¶
type DocumentArchiveRepository interface { Fetch(ctx context.Context, params *Request) ([]DocumentArchive, int64, error) Store(ctx context.Context, body *DocumentArchiveRequest, createdBy string) error Update(ctx context.Context, body *DocumentArchiveRequest, UpdatedBy string, ID int64) error Delete(ctx context.Context, ID int64) error GetByID(ctx context.Context, ID int64) (DocumentArchive, error) TabStatus(ctx context.Context) ([]TabStatusResponse, error) UpdateStatus(ctx context.Context, body *UpdateStatusDocumentArchiveRequest, updatedBy string, ID int64) error }
DocumentArchiveRepository ...
type DocumentArchiveRequest ¶
type DocumentArchiveUsecase ¶
type DocumentArchiveUsecase interface { Fetch(ctx context.Context, params *Request) ([]DocumentArchive, int64, error) FetchWithoutGoRoutine(ctx context.Context, params *Request) ([]DocumentArchive, int64, error) Store(ctx context.Context, body *DocumentArchiveRequest, createdBy string) error Update(ctx context.Context, body *DocumentArchiveRequest, UpdatedBy string, ID int64) error Delete(ctx context.Context, ID int64) error GetByID(ctx context.Context, ID int64) (DocumentArchive, error) TabStatus(ctx context.Context) ([]TabStatusResponse, error) UpdateStatus(ctx context.Context, body *UpdateStatusDocumentArchiveRequest, updatedBy string, ID int64) error }
DocumentArchiveUsecase ...
type ErrResponse ¶
type ErrResponse struct {
Message string `json:"message"`
}
func NewErrResponse ¶
func NewErrResponse(err error) *ErrResponse
type ErrorResults ¶
ErrorResults ...
type Event ¶
type Event struct { ID int64 `json:"id"` Title string `json:"title"` Priority int8 `json:"priority"` Date time.Time `json:"date"` StartHour string `json:"start_hour"` EndHour string `json:"end_hour"` Image NullString `json:"image"` Type string `json:"type"` Status string `json:"status"` Address NullString `json:"address"` URL NullString `json:"url"` Category string `json:"category"` Tags []DataTag `json:"tags"` CreatedBy User `json:"created_by"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Event ...
type EventRepository ¶
type EventRepository interface { Fetch(ctx context.Context, params *Request) (new []Event, total int64, err error) GetByID(ctx context.Context, id int64) (Event, error) GetByTitle(ctx context.Context, title string) (Event, error) Store(ctx context.Context, body *StoreRequestEvent, tx *sql.Tx) error Update(ctx context.Context, id int64, body *StoreRequestEvent, tx *sql.Tx) error Delete(ctx context.Context, id int64) error ListCalendar(ctx context.Context, params *Request) ([]Event, error) AgendaPortal(ctx context.Context, params *Request) (new []Event, total int64, err error) GetTx(ctx context.Context) (*sql.Tx, error) }
EventRepository ..
type EventUsecase ¶
type EventUsecase interface { Fetch(ctx context.Context, au *JwtCustomClaims, params *Request) ([]Event, int64, error) GetByID(ctx context.Context, id int64) (Event, error) GetByTitle(ctx context.Context, title string) (Event, error) Store(context.Context, *StoreRequestEvent) error Update(context.Context, int64, *StoreRequestEvent) error Delete(ctx context.Context, id int64) error ListCalendar(ctx context.Context, params *Request) ([]Event, error) AgendaPortal(ctx context.Context, params *Request) ([]Event, int64, error) }
EventUsecase ..
type ExternalCounterVisitor ¶
type ExternalCounterVisitor struct {
Result CounterVisitor `json:"result"`
}
type ExternalVisitorRepository ¶
type ExternalVisitorRepository interface {
GetCounterVisitor() (ExternalCounterVisitor, error)
}
type FAQ ¶
type FAQ struct {
Items []QuestionAnswer `json:"items,omitempty"`
}
type FacilityService ¶
type FacilityService struct { Title string `json:"title,omitempty"` Items []ItemsFacility `json:"items,omitempty"` }
type FeaturedProgram ¶
type FeaturedProgram struct { ID int64 `json:"id"` Title string `json:"title"` Excerpt string `json:"excerpt"` Description string `json:"description"` Organization string `json:"organization"` Categories JSONStringSlices `json:"categories"` ServiceType string `json:"service_type"` Websites JSONStringSlices `json:"websites"` SocialMedia SocialMedia `json:"social_media"` Logo NullString `json:"logo"` CreatedAt *time.Time `json:"created_at,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` }
FeaturedProgram ...
type FeaturedProgramRepository ¶
type FeaturedProgramRepository interface { Fetch(ctx context.Context, params *Request) (fp []FeaturedProgram, err error) MetaFetch(ctx context.Context, params *Request) (int64, string, error) }
FeaturedProgramRepository represent the featured program repository contract
type FeaturedProgramUsecase ¶
type FeaturedProgramUsecase interface { Fetch(ctx context.Context, params *Request) ([]FeaturedProgram, error) MetaFetch(ctx context.Context, params *Request) (int64, string, error) }
FeaturedProgramUsecase represent the featured program usecases
type FeaturesMds ¶
type Feedback ¶
type Feedback struct { ID int64 `json:"id"` Rating int8 `json:"rating" validate:"required"` Compliments string `json:"compliments" validate:"required,max=1500"` Criticism string `json:"criticism" validate:"required,max=1500"` Suggestions string `json:"suggestions" validate:"required,max=1500"` Sector string `json:"sector" validate:"required,max=1510"` CreatedAt time.Time `json:"created_at"` }
Feedback is a domain model for feedback
type FeedbackRepository ¶
FeedbackRepository represents a feedback repository
type FeedbackUsecase ¶
FeedbackUsecase is an interface for feedback use cases
type GeneralInformation ¶
type GeneralInformation struct { ID int64 `json:"id"` Name string `json:"name"` Alias string `json:"alias"` Description string `json:"description"` Slug string `json:"slug"` Category string `json:"category"` Addresses string `json:"addresses"` Unit string `json:"unit"` Phone string `json:"phone"` Email string `json:"email"` Logo string `json:"logo"` OperationalHours string `json:"operationalHours"` Link string `json:"link"` Media string `json:"media"` SocialMedia string `json:"socialMedia"` Type string `json:"type"` }
type GeneralInformationRepository ¶
type GeneralInformationRepository interface { GetByID(ctx context.Context, id int64) (GeneralInformation, error) Store(context.Context, StorePublicService, *sql.Tx) (id int64, err error) UpdateSlug(context.Context, StorePublicService, int64, *sql.Tx) (err error) Update(context.Context, UpdatePublicService, int64, *sql.Tx) (err error) GetTx(context.Context) (*sql.Tx, error) }
type GeneralInformationUsecase ¶
type GeneralInformationUsecase interface {
GetByID(ctx context.Context, id int64) (GeneralInformation, error)
}
type GovernmentAffair ¶
type GovernmentAffairRepository ¶
type GovernmentAffairRepository interface {
Fetch(ctx context.Context) (res []GovernmentAffair, err error)
}
type GovernmentAffairUsecase ¶
type GovernmentAffairUsecase interface {
Fetch(ctx context.Context) (res []GovernmentAffair, err error)
}
type ImageBanner ¶
type ImageMetaDataBanner ¶
type ImageMetaDataBanner struct { Desktop DetailMetaDataImage `json:"desktop,omitempty"` Mobile DetailMetaDataImage `json:"mobile,omitempty"` }
type InfoGraphic ¶
type InfoGraphic struct {
Images []string `json:"images,omitempty"`
}
type InfographicBanner ¶
type InfographicBannerRepository ¶
type InfographicBannerRepository interface { GetTx(ctx context.Context) (*sql.Tx, error) Fetch(ctx context.Context, params Request) (res []InfographicBanner, total int64, err error) Store(ctx context.Context, body *StoreInfographicBanner, tx *sql.Tx) (err error) GetLastSequence(ctx context.Context) (count int64) SyncSequence(ctx context.Context, sequence int64, tx *sql.Tx) (err error) UpdateSequence(ctx context.Context, ID int64, sequence int8, tx *sql.Tx) (err error) Update(ctx context.Context, ID int64, body *StoreInfographicBanner, tx *sql.Tx) (err error) UpdateStatus(ctx context.Context, ID int64, body *UpdateStatusInfographicBanner, tx *sql.Tx) (err error) Delete(ctx context.Context, ID int64, tx *sql.Tx) (err error) GetByID(ctx context.Context, ID int64, tx *sql.Tx) (res InfographicBanner, err error) }
type InfographicBannerResponse ¶
type InfographicBannerResponse struct { ID int64 `json:"id"` Title string `json:"title"` Sequence int8 `json:"sequence"` Link string `json:"link"` IsActive bool `json:"is_active"` Image ImageBanner `json:"image"` ImageMetaData *ImageMetaDataBanner `json:"image_metadata,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type InfographicBannerUsecase ¶
type InfographicBannerUsecase interface { Store(ctx context.Context, body *StoreInfographicBanner) (err error) Fetch(ctx context.Context, params Request) (res []InfographicBanner, total int64, err error) Delete(ctx context.Context, ID int64) (err error) GetByID(ctx context.Context, ID int64) (res InfographicBanner, err error) UpdateStatus(ctx context.Context, ID int64, body *UpdateStatusInfographicBanner) (err error) UpdateSequence(ctx context.Context, body *UpdateSequenceInfographicBanner) (err error) Update(c context.Context, ID int64, body *StoreInfographicBanner) (err error) }
type Information ¶
type Information struct { ID int64 `json:"id"` Category Category `json:"category" validate:"required"` Title NullString `json:"title" validate:"required"` Content NullString `json:"content" validate:"required"` Slug NullString `json:"slug"` Image NullString `json:"image"` ShowDate NullString `json:"show_date,omitempty"` EndDate NullString `json:"end_date,omitempty"` Status NullString `json:"status"` CreatedBy NullString `json:"created_by"` UpdatedBy NullString `json:"updated_by"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt time.Time `json:"deleted_at"` }
Information ...
type InformationRepository ¶
type InformationRepository interface { Fetch(ctx context.Context, params *Request) (new []Information, total int64, err error) GetByID(ctx context.Context, id int64) (Information, error) }
InformationRepository ...
type InformationUsecase ¶
type InformationUsecase interface { Fetch(ctx context.Context, params *Request) ([]Information, int64, error) GetByID(ctx context.Context, id int64) (Information, error) }
InformationUsecase ...
type ItemsFacility ¶
type JSONStringSlices ¶
type JSONStringSlices []string
JSONStringSlices MarshalJSON for JsonStringSlices
func (*JSONStringSlices) Scan ¶
func (s *JSONStringSlices) Scan(value interface{}) error
Scan implements the JSONStringSlices Scanner interface.
type JSiteGenerateTokenResponse ¶
type JSiteGenerateTokenResponse struct {
AccessToken string `json:"access_token"`
}
type JwtCustomClaims ¶
type JwtCustomRefreshClaims ¶
type ListDocumentArchive ¶
type ListDocumentArchive struct { ID int64 `json:"id"` Title string `json:"title"` Excerpt string `json:"excerpt"` Description string `json:"description"` Source string `json:"source"` Mimetype string `json:"mimetype"` Status string `json:"status"` Category string `json:"category"` IsCompleted bool `json:"is_completed"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
ListDocumentArchive ...
type ListEventCalendarReponse ¶
type ListEventCalendarReponse struct { ID int64 `json:"id"` Title string `json:"title"` Date time.Time `json:"date"` }
ListEventCalendarReponse ..
type ListEventResponse ¶
type ListEventResponse struct { ID int64 `json:"id"` Title string `json:"title"` Date time.Time `json:"date"` StartHour string `json:"start_hour"` EndHour string `json:"end_hour"` Priority int8 `json:"priority"` Type string `json:"type"` Status string `json:"status"` Address NullString `json:"address"` URL NullString `json:"url"` Category string `json:"category"` Tags []DataTag `json:"tags"` }
ListEventResponse model ..
type ListInformation ¶
type ListInformation struct { ID int64 `json:"id"` Title NullString `json:"title"` Excerpt NullString `json:"excerpt"` Category Category `json:"category"` Slug NullString `json:"slug"` Image NullString `json:"image"` Author NullString `json:"author"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
ListInformation ...
type ListMasterDataResponse ¶
type ListMasterDataResponse struct { ID int64 `json:"id"` ServiceName string `json:"service_name"` OpdName string `json:"opd_name"` ServiceUser string `json:"service_user"` Technical string `json:"technical"` UpdatedAt time.Time `json:"updated_at"` Status string `json:"status"` HasPublication int8 `json:"has_publication"` }
type ListPopUpBannerResponse ¶
type ListPopUpBannerResponse struct { ID int64 `json:"id"` Title string `json:"title"` Image ImageBanner `json:"image,omitempty"` Link string `json:"link"` Duration int64 `json:"duration,omitempty"` StartDate *time.Time `json:"start_date,omitempty"` Status string `json:"status"` IsLive int8 `json:"is_live"` }
type ListPublicServiceResponse ¶
type ListPublicServiceResponse struct { ID int64 `json:"id"` Name string `json:"name"` Logo NullString `json:"logo"` Excerpt NullString `json:"excerpt"` Slug NullString `json:"slug"` }
type LiveBannerResponse ¶
type LiveBannerResponse struct { ID int64 `json:"id"` Title string `json:"title"` ButtonLabel string `json:"button_label"` Image ImageBanner `json:"image,omitempty"` Link string `json:"link"` Status string `json:"status"` IsLive int8 `json:"is_live"` Duration int64 `json:"duration"` StartDate *time.Time `json:"start_date"` EndDate *time.Time `json:"end_date,omitempty"` UpdateAt time.Time `json:"updated_at"` }
type LocationMds ¶
type LoginRequest ¶
type LoginResponse ¶
type LogoRepository ¶
type LogoUsecase ¶
type MailRepository ¶
type MainService ¶
type MainService struct { ID int64 `json:"id"` OpdName string `json:"opd_name"` GovernmentAffair string `json:"government_affair"` SubGovernmentAffair string `json:"sub_government_affair"` ServiceForm string `json:"form"` ServiceType string `json:"type"` ServiceName string `json:"name"` ProgramName string `json:"program_name"` Description string `json:"description"` ServiceUser string `json:"user"` SubServiceSpbe string `json:"sub_service_spbe"` OperationalStatus string `json:"operational_status"` Technical string `json:"technical"` Benefits string `json:"benefits"` Facilities string `json:"facilities"` Website string `json:"website"` Links NullString `json:"links"` TermsAndConditions string `json:"terms_and_conditions"` ServiceProcedures string `json:"service_procedures"` ServiceFee string `json:"service_fee"` OperationalTimes NullString `json:"operational_times"` HotlineNumber string `json:"hotline_number"` HotlineMail string `json:"hotline_mail"` Locations NullString `json:"locations"` }
type MainServiceDetail ¶
type MainServiceDetail struct { ID int64 `json:"id"` OpdName string `json:"opd_name"` GovernmentAffair string `json:"government_affair"` SubGovernmentAffair string `json:"sub_government_affair"` ServiceForm string `json:"form"` ServiceType string `json:"type"` ServiceName string `json:"name"` ProgramName string `json:"program_name"` Description string `json:"description"` ServiceUser string `json:"user"` SubServiceSpbe string `json:"sub_service_spbe"` OperationalStatus string `json:"operational_status"` Technical string `json:"technical"` Benefits MdsObject `json:"benefits"` Facilities MdsObject `json:"facilities"` Website string `json:"website"` Links []LinkMds `json:"links"` TermsAndConditions MdsObjectCover `json:"terms_and_conditions"` ServiceProcedures MdsObjectCover `json:"service_procedures"` ServiceFee MdsServiceFee `json:"service_fee"` OperationalTimes []OperationalTimeMds `json:"operational_times"` HotlineNumber string `json:"hotline_number"` HotlineMail string `json:"hotline_mail"` Locations []LocationMds `json:"locations"` }
type MainServiceRepository ¶
type MainServiceRepository interface { Store(ctx context.Context, body *StoreMasterDataService, tx *sql.Tx) (ID int64, err error) Update(ctx context.Context, msID int64, body *StoreMasterDataService, tx *sql.Tx) (err error) UpdateFromPublication(ctx context.Context, msID int64, body *StoreMasterDataService, tx *sql.Tx) (err error) }
type MasterDataPublication ¶
type MasterDataPublication struct { ID int64 `json:"id"` DefaultInformation DefaultInformation `json:"default_information"` ServiceDescription ServiceDescription `json:"service_description"` AdditionalInformation PublicationInformation `json:"additional_information"` Status string `json:"status"` CreatedBy User `json:"created_by"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
type MasterDataPublicationRepository ¶
type MasterDataPublicationRepository interface { Store(ctx context.Context, body *StoreMasterDataPublication) (err error) GetTx(context.Context) (*sql.Tx, error) Fetch(ctx context.Context, params *Request) (res []MasterDataPublication, total int64, err error) Delete(ctx context.Context, id int64) (err error) GetByID(ctx context.Context, ID int64) (res MasterDataPublication, err error) TabStatus(ctx context.Context, params *Request) ([]TabStatusResponseMds, error) Update(ctx context.Context, body *StoreMasterDataPublication, ID int64) (err error) PortalFetch(ctx context.Context, params *Request) ([]MasterDataPublication, error) PortalMetaFetch(ctx context.Context, params *Request) (int64, string, int64, error) SlugExists(ctx context.Context, slug string) (ok bool) GetBySlug(ctx context.Context, slug string) (res MasterDataPublication, err error) }
type MasterDataPublicationUsecase ¶
type MasterDataPublicationUsecase interface { Store(ctx context.Context, body *StoreMasterDataPublication) (err error) Fetch(ctx context.Context, au *JwtCustomClaims, params *Request) (res []MasterDataPublication, total int64, err error) Delete(ctx context.Context, id int64) (err error) GetByID(ctx context.Context, ID int64) (res MasterDataPublication, err error) TabStatus(ctx context.Context, au *JwtCustomClaims, params *Request) ([]TabStatusResponseMds, error) Update(ctx context.Context, body *StoreMasterDataPublication, ID int64) (err error) PortalFetch(ctx context.Context, params *Request) (sp []MasterDataPublication, err error) PortalMetaFetch(ctx context.Context, params *Request) (int64, string, int64, error) GetBySlug(ctx context.Context, slug string) (res MasterDataPublication, err error) }
type MasterDataPublicationUsecaseArgs ¶
type MasterDataPublicationUsecaseArgs struct { PubRepo MasterDataPublicationRepository MdsRepo MasterDataServiceRepository MsRepo MainServiceRepository ApRepo ApplicationRepository UserRepo UserRepository SearchRepo SearchRepository Cfg *config.Config ContextTimeout time.Duration }
type MasterDataService ¶
type MasterDataService struct { ID int64 `json:"id"` MainService MainService `json:"main_service"` Application Application `json:"application"` AdditionalInformation AdditionalInformation `json:"additional_information"` Status string `json:"status"` HasPublication int8 `json:"has_publication"` CreatedBy User `json:"created_by"` UpdatedAt time.Time `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
type MasterDataServiceRepository ¶
type MasterDataServiceRepository interface { Store(ctx context.Context, body *StoreMasterDataService, tx *sql.Tx) (err error) GetTx(context.Context) (*sql.Tx, error) Fetch(ctx context.Context, params *Request) (res []MasterDataService, total int64, err error) Delete(ctx context.Context, ID int64) (err error) GetByID(ctx context.Context, ID int64) (res MasterDataService, err error) Update(context.Context, *StoreMasterDataService, *MasterDataServiceEntityID, *sql.Tx) (err error) TabStatus(ctx context.Context, params *Request) (res []TabStatusResponseMds, err error) Archive(ctx context.Context, params *Request) (res []MasterDataService, err error) CheckHasPublication(ctx context.Context, ID int64) (res MasterDataService, err error) UpdateHasPublication(ctx context.Context, ID int64, HasPublication int8) (err error) }
type MasterDataServiceUsecase ¶
type MasterDataServiceUsecase interface { Store(ctx context.Context, au *JwtCustomClaims, body *StoreMasterDataService) (err error) Fetch(ctx context.Context, au *JwtCustomClaims, params *Request) (res []MasterDataService, total int64, err error) Delete(ctx context.Context, ID int64) (err error) GetByID(ctx context.Context, ID int64) (res MasterDataService, err error) Update(context.Context, *StoreMasterDataService, int64) (err error) TabStatus(ctx context.Context, au *JwtCustomClaims, params *Request) ([]TabStatusResponseMds, error) Archive(ctx context.Context, au *JwtCustomClaims, params *Request) (res []MasterDataService, err error) }
type MasterDataServiceUsecaseArgs ¶
type MasterDataServiceUsecaseArgs struct { MdsRepo MasterDataServiceRepository MsRepo MainServiceRepository ApRepo ApplicationRepository AiRepo AdditionalInformationRepository UserRepo UserRepository Cfg *config.Config ContextTimeout time.Duration }
type MdsApplication ¶
type MdsItemCovers ¶
type MdsItems ¶
type MdsItems struct { Name string `json:"name,omitempty"` Image DetailMetaDataImage `json:"image,omitempty"` }
type MdsObjectCover ¶
type MdsObjectCover struct { Cover DetailMetaDataImage `json:"cover"` Title string `json:"title"` IsActive int8 `json:"is_active"` Items []MdsItemCovers `json:"items"` }
type MdsServiceFee ¶
type MediaParamsRequest ¶
type MediaResponse ¶
type MediaUsecase ¶
type MediaUsecase interface { Store(context.Context, *multipart.FileHeader, bytes.Buffer, MediaParamsRequest) (*MediaResponse, error) Delete(ctx context.Context, body *DeleteMediaRequest) (err error) }
MediaUsecase is an interface for media use cases
type MessageResponse ¶
type MessageResponse struct {
Message string `json:"message"`
}
type MetaAggregations ¶
type MetaAggregations struct {
Domain AggDomain `json:"domain"`
}
type MetaData ¶
type MetaData struct { TotalCount int64 `json:"total_count"` TotalPage float64 `json:"total_page"` CurrentPage int64 `json:"current_page"` PerPage int64 `json:"per_page"` Aggregations *MetaAggregations `json:"aggregations,omitempty"` }
MetaData ...
type MetaDetailPopUpBannerResponse ¶
type MetaDetailPopUpBannerResponse struct { ID int64 `json:"id"` Title string `json:"title"` ButtonLabel string `json:"button_label"` ImageMetaData ImageMetaDataBanner `json:"image,omitempty"` Link string `json:"link"` Status string `json:"status"` IsLive int8 `json:"is_live"` Duration int64 `json:"duration"` StartDate *time.Time `json:"start_date"` EndDate *time.Time `json:"end_date,omitempty"` UpdateAt time.Time `json:"updated_at"` }
type News ¶
type News struct { ID int64 `json:"id"` Title string `json:"title" validate:"required"` Excerpt string `json:"excerpt" validate:"required"` Content string `json:"content" validate:"required"` Slug string `json:"slug"` Image *string `json:"image"` Video *string `json:"video"` Source *string `json:"source"` Status string `json:"status,omitempty"` Views int64 `json:"views"` Highlight int8 `json:"highlight,omitempty"` Type string `json:"type"` Tags []DataTag `json:"tags"` Website *string `json:"website"` Category string `json:"category" validate:"required"` Author *string `json:"author" validate:"required"` Reporter *string `json:"reporter"` Editor *string `json:"editor"` Area Area `json:"area" validate:"required"` Duration int8 `json:"duration"` StartDate *time.Time `json:"start_date"` EndDate *time.Time `json:"end_date"` IsLive int8 `json:"is_live"` Link string `json:"link"` CreatedBy User `json:"created_by"` UpdatedBy User `json:"updated_by"` PublishedAt *time.Time `json:"published_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
News ...
type NewsAptikaResponse ¶
type NewsAptikaResponse struct { ID int64 `json:"id"` Title string `json:"Judul_berita"` Excerpt string `json:"Lead_berita"` PublishedAt *time.Time `json:"Tanggal"` Content string `json:"Isi"` Category string `json:"Kategori"` Website *string `json:"Website"` Image *string `json:"Gambar"` Source string `json:"Sumber_berita"` Author string `json:"Author"` Area Area `json:"Area"` CreatedBy Author `json:"Dibuat_oleh"` CreatedAt time.Time `json:"Dibuat_pada"` UpdatedAt time.Time `json:"Diubah_pada"` }
NewsAptikaResponse is the response for news api Aptika for existing jabarprov
type NewsBanner ¶
type NewsBanner struct { ID int64 `json:"id"` Title string `json:"title"` Category string `json:"category"` Image *string `json:"image"` Slug NullString `json:"slug"` Link string `json:"link"` Author string `json:"author"` Reporter string `json:"reporter"` Editor string `json:"editor"` CreatedBy Author `json:"created_by,omitempty"` CreatedAt time.Time `json:"created_at"` PublishedAt *time.Time `json:"published_at"` RelatedNews []NewsBanner `json:"related_news"` }
NewsBanner ...
type NewsListResponse ¶
type NewsListResponse struct { ID int64 `json:"id"` Title string `json:"title"` Excerpt string `json:"excerpt"` Slug NullString `json:"slug"` Image *string `json:"image"` Category string `json:"category"` Author string `json:"author"` Reporter string `json:"reporter"` Editor string `json:"editor"` Video NullString `json:"video"` Source NullString `json:"source"` Tags []DataTag `json:"tags"` Status string `json:"status"` IsLive int8 `json:"is_live"` Link string `json:"link"` CreatedBy Author `json:"created_by"` PublishedAt *time.Time `json:"published_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
NewsListResponse ...
type NewsRepository ¶
type NewsRepository interface { Fetch(ctx context.Context, params *Request) (new []News, total int64, err error) FetchNewsBanner(ctx context.Context) (news []News, err error) FetchNewsHeadline(ctx context.Context) (news []News, err error) GetByID(ctx context.Context, id int64) (News, error) GetBySlug(ctx context.Context, slug string, is_live int) (News, error) AddView(ctx context.Context, slug string) (err error) Store(ctx context.Context, n *StoreNewsRequest, tx *sql.Tx) error Update(ctx context.Context, id int64, n *StoreNewsRequest, tx *sql.Tx) error TabStatus(ctx context.Context, params *Request) (res []TabStatusResponse, err error) Delete(ctx context.Context, id int64) error GetTx(ctx context.Context) (*sql.Tx, error) FetchNewsByCategories(ctx context.Context) ([]News, error) }
NewsRepository represent the news repository contract
type NewsUsecase ¶
type NewsUsecase interface { Fetch(ctx context.Context, au *JwtCustomClaims, params *Request) ([]News, int64, error) FetchPublished(ctx context.Context, params *Request) ([]News, int64, error) FetchNewsBanner(ctx context.Context) ([]NewsBanner, error) FetchNewsHeadline(ctx context.Context) ([]News, error) GetByID(ctx context.Context, id int64) (News, error) GetBySlug(ctx context.Context, slug string) (News, error) GetViewsBySlug(ctx context.Context, slug string) (News, error) Store(context.Context, *StoreNewsRequest) error Update(context.Context, int64, *StoreNewsRequest) error UpdateStatus(context.Context, int64, string) error TabStatus(context.Context, *JwtCustomClaims) ([]TabStatusResponse, error) Delete(ctx context.Context, id int64) error }
NewsUsecase represent the news usecases
type NullInt64 ¶
NullInt64 is an alias for sql.NullInt64 data type
func (*NullInt64) MarshalJSON ¶
MarshalJSON for NullInt64
type NullString ¶
type NullString sql.NullString
NullString ...
func (*NullString) MarshalJSON ¶
func (ns *NullString) MarshalJSON() ([]byte, error)
MarshalJSON for NullString
func (*NullString) Scan ¶
func (ns *NullString) Scan(value interface{}) error
Scan implements the Scanner interface for NullString
func (*NullString) UnmarshalJSON ¶
func (ns *NullString) UnmarshalJSON(b []byte) error
UnmarshalJSON for NullString
type NullTime ¶
NullTime ...
func (*NullTime) UnmarshalJSON ¶
UnmarshalJSON ...
type OperationalHours ¶
type OperationalTimeMds ¶
type PopUpBanner ¶
type PopUpBanner struct { ID int64 `json:"id"` Title string `json:"title"` ButtonLabel string `json:"button_label,omitempty"` Image NullString `json:"image,omitempty"` Link string `json:"link"` Status string `json:"status"` Duration int64 `json:"duration,omitempty"` IsLive int8 `json:"is_live"` StartDate *time.Time `json:"start_date,omitempty"` EndDate *time.Time `json:"end_date,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type PopUpBannerRepository ¶
type PopUpBannerRepository interface { Fetch(ctx context.Context, params *Request) (res []PopUpBanner, total int64, err error) GetByID(ctx context.Context, id int64) (res PopUpBanner, err error) Store(ctx context.Context, body *StorePopUpBannerRequest) (err error) Delete(ctx context.Context, id int64) (err error) UpdateStatus(ctx context.Context, id int64, body *UpdateStatusPopUpBannerRequest) (err error) DeactiveStatus(ctx context.Context) (err error) Update(ctx context.Context, id int64, body *StorePopUpBannerRequest) (err error) LiveBanner(ctx context.Context) (res PopUpBanner, err error) }
type PopUpBannerUsecase ¶
type PopUpBannerUsecase interface { Fetch(ctx context.Context, auth *JwtCustomClaims, params *Request) (res []PopUpBanner, total int64, err error) GetByID(ctx context.Context, id int64) (res PopUpBanner, err error) Store(ctx context.Context, auth *JwtCustomClaims, body *StorePopUpBannerRequest) (err error) Delete(ctx context.Context, id int64) (err error) UpdateStatus(ctx context.Context, id int64, body *UpdateStatusPopUpBannerRequest) (err error) Update(ctx context.Context, auth *JwtCustomClaims, id int64, body *StorePopUpBannerRequest) (err error) GetMetaDataImage(ctx context.Context, link string) (meta DetailMetaDataImage, err error) LiveBanner(ctx context.Context) (res PopUpBanner, err error) }
type PosterInfo ¶
type PosterInfo struct { Requirements JSONStringSlices `json:"requirements"` Posters JSONStringSlices `json:"posters"` }
PosterInfo ...
func (*PosterInfo) Scan ¶
func (s *PosterInfo) Scan(value interface{}) error
Scan implements the PosterInfo Scanner interface.
type PubApplication ¶
type PubApplication struct { ID int64 `json:"id"` Name string `json:"name"` Status string `json:"status"` Title string `json:"title"` Features NullString `json:"features"` }
type PublicService ¶
type PublicService struct { ID int64 `json:"id"` Name string `json:"name"` Facilities string `json:"facilities"` Description NullString `json:"description"` Excerpt NullString `json:"excerpt"` Unit NullString `json:"unit"` Url NullString `json:"url"` Category NullString `json:"category"` IsActive NullString `json:"is_active"` Slug NullString `json:"slug"` ServiceType NullString `json:"service_type"` Video NullString `json:"video"` Logo NullString `json:"logo"` Website NullString `json:"website"` SocialMedia SocialMedia `json:"social_media"` Images JSONStringSlices `json:"images"` Purposes JSONStringSlices `json:"purposes"` Info PosterInfo `json:"info"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
PublicService ...
type PublicServiceRepository ¶
type PublicServiceRepository interface { Fetch(ctx context.Context, params *Request) (ps []PublicService, err error) MetaFetch(ctx context.Context, params *Request) (int64, string, error) GetBySlug(ctx context.Context, slug string) (PublicService, error) }
PublicServiceRepository ...
type PublicServiceUsecase ¶
type PublicServiceUsecase interface { Fetch(ctx context.Context, params *Request) ([]PublicService, error) MetaFetch(ctx context.Context, params *Request) (int64, string, error) GetBySlug(ctx context.Context, slug string) (PublicService, error) }
PublicServiceUsecase ...
type PublicationFAQ ¶
type PublicationInfographic ¶
type PublicationInfographic struct { IsActive int8 `json:"is_active"` Images []DetailMetaDataImage `json:"images"` }
type PublicationInformation ¶
type PublicationInformation struct { Keywords NullString `json:"keywords"` FAQ NullString `json:"faq"` }
type QuestionAnswer ¶
type QuickAccess ¶
type QuickAccessRepository ¶
type QuickAccessRepository interface { GetTx(ctx context.Context) (*sql.Tx, error) Fetch(ctx context.Context, params Request) (res []QuickAccess, total int64, err error) Store(ctx context.Context, body *StoreQuickAccess, tx *sql.Tx) (err error) Update(ctx context.Context, ID int64, body *StoreQuickAccess, tx *sql.Tx) (err error) UpdateStatus(ctx context.Context, ID int64, body *UpdateStatusQuickAccess, tx *sql.Tx) (err error) Delete(ctx context.Context, ID int64, tx *sql.Tx) (err error) GetByID(ctx context.Context, ID int64) (res QuickAccess, err error) CountByActived(ctx context.Context) (total int64) }
type QuickAccessResponse ¶
type QuickAccessUsecase ¶
type QuickAccessUsecase interface { Store(ctx context.Context, body *StoreQuickAccess) (err error) Fetch(ctx context.Context, params Request) (res []QuickAccess, total int64, err error) Delete(ctx context.Context, ID int64) (err error) GetByID(ctx context.Context, ID int64) (res QuickAccess, err error) Update(c context.Context, ID int64, body *StoreQuickAccess) (err error) UpdateStatus(ctx context.Context, ID int64, body *UpdateStatusQuickAccess) (err error) }
type RefreshRequest ¶
type RefreshRequest struct {
Token string `json:"token" validate:"required"`
}
type RegistrationInvitation ¶
type RegistrationInvitationRepository ¶
type RegistrationInvitationRepository interface { GetByEmail(ctx context.Context, email string) (RegistrationInvitation, error) GetByToken(ctx context.Context, token string) (RegistrationInvitation, error) Store(ctx context.Context, invitation *RegistrationInvitation) error Delete(ctx context.Context, id uuid.UUID) error Update(ctx context.Context, id uuid.UUID, invitation *RegistrationInvitation) error }
type RegistrationInvitationUsecase ¶
type RegistrationInvitationUsecase interface { Invite(context.Context, RegistrationInvitation) (RegistrationInvitation, error) Authorize(ctx context.Context, token string) (RegistrationInvitationClaim, error) }
type Request ¶
type Request struct { Keyword string Page int64 PerPage int64 Offset int64 SortBy string SortOrder string `default:"desc"` StartDate string EndDate string Filters map[string]interface{} }
Request ...
type Requirement ¶
type ResultsData ¶
type ResultsData struct { Data interface{} `json:"data"` Meta interface{} `json:"meta,omitempty"` }
ResultsData ...
type Role ¶
type Role struct { ID int8 `json:"id"` Name string `json:"name"` Description string `json:"description"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Role ...
type RoleRepository ¶
RoleRepository represent the unit repository contract
type SchedulerPopUpBanner ¶
type Search ¶
type Search struct { ID int `json:"id"` Domain string `json:"domain"` Title string `json:"title"` Excerpt string `json:"excerpt"` Content string `json:"content"` Slug string `json:"slug"` Category string `json:"category"` Thumbnail string `json:"thumbnail"` Unit string `json:"unit"` Url string `json:"url"` Highlight []string `json:"highlight"` PublishedAt *time.Time `json:"published_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` IsActive bool `json:"is_active"` }
Search ...
type SearchListResponse ¶
type SearchListResponse struct { ID int `json:"id"` Domain string `json:"domain"` Title string `json:"title"` Excerpt string `json:"excerpt"` Content string `json:"content"` Slug string `json:"slug"` Category string `json:"category"` Thumbnail string `json:"thumbnail"` Unit string `json:"unit"` Url string `json:"url"` Highlight interface{} `json:"highlight"` PublishedAt *time.Time `json:"published_at"` CreatedAt time.Time `json:"created_at" mapstructure:"created_at"` }
SearchListResponse ...
type SearchRepository ¶
type SearchRepository interface { Fetch(ctx context.Context, indices string, params *Request) (docs []SearchListResponse, total int64, aggs interface{}, err error) Store(ctx context.Context, indices string, body *Search) (err error) Update(ctx context.Context, indices string, id int, body *Search) (err error) Delete(ctx context.Context, indices string, id int, domain string) (err error) SearchSuggestion(ctx context.Context, indices string, params *Request) (res []SuggestResponse, err error) }
SearchRepository represent the search repository contract
type SearchUsecase ¶
type SearchUsecase interface { Fetch(ctx context.Context, params *Request) ([]SearchListResponse, int64, interface{}, error) SearchSuggestion(ctx context.Context, params *Request) ([]SuggestResponse, error) }
SearchUsecase represent the search usecases
type ServiceDescription ¶
type ServiceDescription struct { Cover NullString `json:"cover"` Images NullString `json:"images"` TermsAndConditions NullString `json:"terms_and_conditions"` ServiceProcedures NullString `json:"service_procedures"` ServiceFee NullString `json:"service_fee"` OperationalTimes NullString `json:"operational_times"` HotlineNumber string `json:"hotline_number"` HotlineMail string `json:"hotline_mail"` InfoGraphics NullString `json:"infographics"` Locations NullString `json:"locations"` Application PubApplication `json:"application"` Links NullString `json:"links"` SocialMedia NullString `json:"social_media"` }
type ServicePublic ¶
type ServicePublic struct { ID int64 `json:"id"` GeneralInformation GeneralInformation `json:"general_information"` Purpose NullString `json:"purpose"` Facility NullString `json:"facility"` Requirement NullString `json:"requirement"` ToS NullString `json:"tos"` InfoGraphic NullString `json:"info_graphic"` FAQ NullString `json:"faq"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type ServicePublicRepository ¶
type ServicePublicRepository interface { Fetch(ctx context.Context, params *Request) (sp []ServicePublic, err error) MetaFetch(ctx context.Context, params *Request) (int64, string, int64, error) GetBySlug(ctx context.Context, slug string) (ServicePublic, error) Store(context.Context, StorePublicService, *sql.Tx) (err error) Delete(context.Context, int64) (err error) GetByID(ctx context.Context, ID int64) (ServicePublic, error) Update(context.Context, UpdatePublicService, int64, *sql.Tx) (err error) }
type ServicePublicUsecase ¶
type ServicePublicUsecase interface { Fetch(ctx context.Context, params *Request) ([]ServicePublic, error) MetaFetch(ctx context.Context, params *Request) (int64, string, int64, error) GetBySlug(ctx context.Context, slug string) (ServicePublic, error) Store(context.Context, StorePublicService) error Delete(context.Context, int64) error Update(context.Context, UpdatePublicService, int64) error }
type SocialMedia ¶
type SocialMedia struct { Facebook NullString `json:"facebook"` Instagram NullString `json:"instagram"` Twitter NullString `json:"twitter"` Tiktok NullString `json:"tiktok"` Youtube NullString `json:"youtube"` }
SocialMedia ...
func (*SocialMedia) Scan ¶
func (s *SocialMedia) Scan(value interface{}) error
Scan implements the SocialMedia Scanner struct.
type SocialMediaMds ¶
type SpbeRalsRepository ¶
type SpbeRalsUsecase ¶
type StoreInfographicBanner ¶
type StoreInfographicBanner struct { Title string `json:"title" validate:"required,max=255"` Link string `json:"link"` Image ImageBanner `json:"image" validate:"required"` }
type StoreLogoRequest ¶
type StoreMasterDataPublication ¶
type StoreMasterDataPublication struct { ID int64 `json:"id"` DefaultInformation struct { MdsID int64 `json:"mds_id"` PortalCategory string `json:"portal_category"` Logo DetailMetaDataImage `json:"logo"` Slug string `json:"slug"` Benefits MdsObject `json:"benefits"` Facilities MdsObject `json:"facilities"` } `json:"default_information" validate:"required"` ServiceDescription struct { Cover CoverPublication `json:"cover"` Images []DetailMetaDataImage `json:"images"` InfoGraphics PublicationInfographic `json:"infographics"` TermsAndConditions MdsObjectCover `json:"terms_and_conditions"` ServiceProcedures MdsObjectCover `json:"service_procedures"` Application MdsApplication `json:"application"` } `json:"service_description" validate:"required"` AdditionalInformation struct { Keywords []string `json:"keywords"` FAQ PublicationFAQ `json:"faq"` } `json:"additional_information" validate:"required"` Status string `json:"status" validate:"required,eq=PUBLISH|eq=ARCHIVE"` CreatedBy User `json:"created_by"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type StoreMasterDataService ¶
type StoreMasterDataService struct { ID int64 `json:"id"` Services struct { ID int64 `json:"id"` Information struct { OpdName int64 `json:"opd_name"` GovernmentAffair string `json:"government_affair"` SubGovernmentAffair string `json:"sub_government_affair"` ServiceForm string `json:"form"` ServiceType string `json:"type"` ServiceName string `json:"name"` ProgramName string `json:"program_name"` Description string `json:"description"` ServiceUser string `json:"user"` SubServiceSpbe string `json:"sub_service_spbe"` OperationalStatus string `json:"operational_status"` Technical string `json:"technical"` Benefits MdsObject `json:"benefits"` Facilities MdsObject `json:"facilities"` Website string `json:"website"` Links []struct { Tautan string `json:"tautan"` Type string `json:"type"` Label string `json:"label"` } `json:"links"` } `json:"information"` ServiceDetail struct { TermsAndConditions MdsObjectCover `json:"terms_and_conditions"` ServiceProcedures MdsObjectCover `json:"service_procedures"` ServiceFee MdsServiceFee `json:"service_fee"` OperationalTime []struct { Day string `json:"day"` Start string `json:"start"` End string `json:"end"` } `json:"operational_time"` HotlineNumber string `json:"hotline_number"` HotlineMail string `json:"hotline_mail"` } `json:"service_detail"` Location []struct { Type string `json:"type"` Organization string `json:"organization"` Name string `json:"name"` Address string `json:"address"` PhoneNumber string `json:"phone_number"` } `json:"location"` } `json:"services" validate:"required"` Application MdsApplication `json:"application" validate:"required"` AdditionalInformation struct { ID int64 `json:"id"` ResponsibleName string `json:"responsible_name"` PhoneNumber string `json:"phone_number"` Email string `json:"email"` SocialMedia []struct { Name string `json:"name"` Type string `json:"type" validate:"required,eq=GOOGLE_FORM|eq=|eq=GOOGLE_PLAYSTORE|eq=APP_STORE|eq=WEBSITE|eq=TIKTOK"` Link string `json:"link"` } `json:"social_media"` } `json:"additional_information" validate:"required"` Status string `json:"status" validate:"required,eq=DRAFT|eq=ARCHIVE"` CreatedBy User `json:"created_by"` }
type StoreNewsRequest ¶
type StoreNewsRequest struct { ID int64 `json:"id"` Title string `json:"title" validate:"required,max=255"` TitleEn string `json:"title_en,omitempty"` Excerpt string `json:"excerpt"` ExcerptEn string `json:"excerpt_en,omitempty"` Content string `json:"content"` ContentEn string `json:"content_en,omitempty"` Slug string `json:"slug"` Image *string `json:"image"` Video string `json:"video"` Source string `json:"source"` Status string `json:"status" validate:"required,eq=DRAFT|eq=REVIEW|eq=PUBLISHED|eq=ARCHIVED"` Type string `json:"type"` Category string `json:"category"` Author string `json:"author"` Reporter string `json:"reporter"` Editor string `json:"editor"` Duration int8 `json:"duration"` StartDate *string `json:"start_date"` EndDate *string `json:"end_date"` Tags []string `json:"tags"` AreaID int64 `json:"area_id"` IsLive int8 `json:"is_live"` Link string `json:"link"` PublishedAt *time.Time `json:"published_at"` CreatedBy User `json:"created_by"` UpdatedBy User `json:"updated_by"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type StorePopUpBannerRequest ¶
type StorePopUpBannerRequest struct { ID int64 `json:"id"` Title string `json:"title" validate:"required,max=255"` CustomButton CustomButtonlabel `json:"custom_button,omitempty"` Scheduler SchedulerPopUpBanner `json:"scheduler,omitempty"` Image ImageBanner `json:"image" validate:"required"` }
type StorePserviceRequest ¶
type StorePserviceRequest struct { ID int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` Unit string `json:"unit,omitempty"` Url string `json:"url"` Image string `json:"image"` Category string `json:"category"` IsActive int8 `json:"is_active"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type StorePublicService ¶
type StorePublicService struct { GeneralInformation struct { ID int64 `json:"id"` Name string `json:"name" validate:"required"` Alias string `json:"alias" validate:"required"` Description string `json:"description"` Category string `json:"category" validate:"required"` Addresses []string `json:"addresses"` Unit string `json:"unit" validate:"required"` Phone []string `json:"phone"` Email string `json:"email"` Logo string `json:"logo"` OperationalHours []struct { Start string `json:"start"` End string `json:"end"` } `json:"operational_hours"` Media struct { Video string `json:"video"` Images []string `json:"images"` } `json:"media"` SocialMedia struct { Facebook string `json:"facebook" validate:"omitempty,url"` Instagram string `json:"instagram" validate:"omitempty,url"` Twitter string `json:"twitter" validate:"omitempty,url"` Tiktok string `json:"tiktok" validate:"omitempty,url"` Youtube string `json:"youtube" validate:"omitempty,url"` } `json:"social_media"` Link struct { Website string `json:"website" validate:"omitempty,url"` Google_play string `json:"google_play" validate:"omitempty,url"` Google_form string `json:"google_form" validate:"omitempty,url"` App_store string `json:"app_store" validate:"omitempty,url"` } `json:"link"` Type string `json:"type"` } `json:"general_information"` Purpose struct { Title string `json:"title"` Items []string `json:"items"` } `json:"purpose"` Facility struct { Title string `json:"title"` Items []struct { Image string `json:"image"` Title string `json:"title"` } `json:"items"` } `json:"facility"` Requirement struct { Title string `json:"title"` Items []struct { Link string `json:"link" validate:"omitemty,url"` Description string `json:"description"` } `json:"items"` } `json:"requirement"` Tos struct { Title string `json:"title"` Items []struct { Link string `json:"link" validate:"omitemty,url"` Description string `json:"description"` } `json:"items"` Image string `json:"image" validate:"omitempty,url"` } `json:"tos"` Infographic struct { Images []string `json:"images" validate:"omitempty,min=1"` } `json:"infographic"` Faq struct { Items []struct { Question string `json:"question"` Answer string `json:"answer"` } `json:"items"` } `json:"faq"` }
type StoreQuickAccess ¶
type StoreRequestEvent ¶
type StoreRequestEvent struct { ID int64 `json:"id"` Title string `json:"title" validate:"required,max=255"` Type string `json:"type" validate:"required,alpha,eq=online|eq=offline"` URL string `json:"url"` Address string `json:"address" validate:"max=255"` Date string `json:"date" validate:"required"` StartHour string `json:"start_hour" validate:"required"` EndHour string `json:"end_hour" validate:"required"` Category string `json:"category" validate:"required"` Tags []string `json:"tags"` CreatedBy User `json:"created_by" validate:"required"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
StoreRequestEvent ..
type SuggestResponse ¶
type SuggestResponse struct {
Value string `json:"value" mapstructure:"title"`
}
SuggestResponse ..
type SyncSequence ¶
type TabStatusResponse ¶
type TabStatusResponseMds ¶
type TagRepository ¶
type TagRepository interface { StoreTag(ctx context.Context, t *Tag, tx *sql.Tx) error FetchTag(ctx context.Context, param *Request) ([]Tag, int64, error) GetTagByName(ctx context.Context, name string) (Tag, error) }
TagRepository interface ..
type TagUsecase ¶
TagUsecase represent the tag usecases
type Template ¶
type Template struct { ID int8 `json:"id"` From string `json:"from"` To string `json:"to"` Subject string `json:"subject"` CC string `json:"cc"` Body string `json:"body"` Key string `json:"key"` }
Template ..
type TemplateRepository ¶
type TemplateUsecase ¶
type TermsOfService ¶
type Unit ¶
type Unit struct { ID int64 `json:"id"` ParentID NullInt64 `json:"parent_id"` Name NullString `json:"name" validate:"required"` Description NullString `json:"description"` Logo NullString `json:"logo"` Website NullString `json:"website"` PPID NullString `json:"ppid"` Phone NullString `json:"phone"` Address NullString `json:"address"` Chief NullString `json:"chief"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Unit ...
type UnitInfo ¶
type UnitInfo struct { ID int64 `json:"id"` Name NullString `json:"name" validate:"required"` Chief NullString `json:"chief"` Address NullString `json:"address"` Website NullString `json:"website"` PPID NullString `json:"ppid"` Logo NullString `json:"logo"` Phone NullString `json:"phone"` }
UnitInfo ...
type UnitRepository ¶
type UnitRepository interface { Fetch(ctx context.Context, params *Request) (new []Unit, total int64, err error) GetByID(ctx context.Context, id int64) (Unit, error) }
UnitRepository represent the unit repository contract
type UnitUsecase ¶
type UnitUsecase interface { Fetch(ctx context.Context, params *Request) ([]Unit, int64, error) GetByID(ctx context.Context, id int64) (Unit, error) }
UnitUsecase represent the unit usecases
type UpdateNewsStatusRequest ¶
type UpdateNewsStatusRequest struct {
Status string `json:"status" validate:"required,eq=DRAFT|eq=REVIEW|eq=PUBLISHED|eq=ARCHIVED"`
}
UpdateNewsStatusRequest ...
type UpdatePublicService ¶
type UpdatePublicService struct { GeneralInformation struct { ID int64 `json:"id"` Name string `json:"name" validate:"required"` Slug string `json:"slug"` Alias string `json:"alias" validate:"required"` Description string `json:"description"` Category string `json:"category" validate:"required"` Addresses []string `json:"addresses"` Unit string `json:"unit" validate:"required"` Phone []string `json:"phone"` Email string `json:"email"` Logo string `json:"logo"` OperationalHours []struct { Start string `json:"start"` End string `json:"end"` } `json:"operational_hours"` Media struct { Video string `json:"video"` Images []string `json:"images"` } `json:"media"` SocialMedia struct { Facebook string `json:"facebook" validate:"omitempty,url"` Instagram string `json:"instagram" validate:"omitempty,url"` Twitter string `json:"twitter" validate:"omitempty,url"` Tiktok string `json:"tiktok" validate:"omitempty,url"` Youtube string `json:"youtube" validate:"omitempty,url"` } `json:"social_media"` Link struct { Website string `json:"website" validate:"omitempty,url"` Google_play string `json:"google_play" validate:"omitempty,url"` Google_form string `json:"google_form" validate:"omitempty,url"` App_store string `json:"app_store" validate:"omitempty,url"` } `json:"link"` Type string `json:"type"` } `json:"general_information"` Purpose struct { Title string `json:"title"` Items []string `json:"items"` } `json:"purpose"` Facility struct { Title string `json:"title"` Items []struct { Image string `json:"image"` Title string `json:"title"` } `json:"items"` } `json:"facility"` Requirement struct { Title string `json:"title"` Items []struct { Link string `json:"link" validate:"omitemty,url"` Description string `json:"description"` } `json:"items"` } `json:"requirement"` Tos struct { Title string `json:"title"` Items []struct { Link string `json:"link" validate:"omitemty,url"` Description string `json:"description"` } `json:"items"` Image string `json:"image" validate:"omitempty,url"` } `json:"tos"` Infographic struct { Images []string `json:"images" validate:"omitempty,min=1"` } `json:"infographic"` Faq struct { Items []struct { Question string `json:"question"` Answer string `json:"answer"` } `json:"items"` } `json:"faq"` }
type UpdateSequenceInfographicBanner ¶
type UpdateSequenceInfographicBanner struct {
IDs []int64 `json:"ids" validate:"required"`
}
type UpdateStatusDocumentArchiveRequest ¶
type UpdateStatusDocumentArchiveRequest struct {
Status string `json:"status" validate:"required,eq=DRAFT|eq=PUBLISHED|eq=ARCHIVED"`
}
type UpdateStatusInfographicBanner ¶
type UpdateStatusInfographicBanner struct {
IsActive *int8 `json:"is_active" validate:"required,eq=1|eq=0"`
}
type UpdateStatusQuickAccess ¶
type UpdateStatusQuickAccess struct {
IsActive *int8 `json:"is_active" validate:"required,eq=1|eq=0"`
}
type UptdCabdin ¶
type UptdCabdinRepository ¶
type UptdCabdinRepository interface {
Fetch(ctx context.Context) (res []UptdCabdin, err error)
}
type UptdCabdinUsecase ¶
type UptdCabdinUsecase interface {
Fetch(ctx context.Context) (res []UptdCabdin, err error)
}
type User ¶
type User struct { ID uuid.UUID `json:"id"` Name string `json:"name" validate:"omitempty,required,max=100"` Username string `json:"username" validate:"omitempty,required,max=62"` Email string `json:"email" validate:"omitempty,required,max=64"` Password string `json:"password"` LastPasswordChanged *time.Time `json:"last_password_changed"` LastActive *time.Time `json:"last_active"` Status string `json:"status"` Nip *string `json:"nip" validate:"omitempty,len=0|len=18"` Occupation *string `json:"occupation" validate:"omitempty,max=100"` Photo *string `json:"photo" validate:"omitempty,max=255"` Unit UnitInfo `json:"unit"` UnitName string `json:"unit_name"` Role RoleInfo `json:"role"` Token string `json:"token"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt time.Time `json:"deleted_at"` }
User ...
type UserInfo ¶
type UserInfo struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Username string `json:"username"` Email string `json:"email"` Nip *string `json:"nip"` Occupation *string `json:"occupation"` Photo *string `json:"photo"` Unit UnitInfo `json:"unit"` Role RoleInfo `json:"role"` Status string `json:"status"` LastActive *time.Time `json:"last_active"` LastPasswordChanged *time.Time `json:"last_password_changed"` }
UserInfo ...
type UserListResponse ¶
type UserListResponse struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Email string `json:"email"` Role RoleInfo `json:"role"` LastActive *time.Time `json:"last_active"` Status string `json:"status"` }
UserListResponse ...
type UserRepository ¶
type UserRepository interface { GetByID(ctx context.Context, id uuid.UUID) (User, error) GetByNip(ctx context.Context, nip *string) (User, error) GetByEmail(ctx context.Context, email string) (User, error) Store(context.Context, *User) error Update(context.Context, *User) error WriteLastActive(context.Context, time.Time, *User) error Fetch(context.Context, *Request) ([]User, int64, error) SetAsAdmin(context.Context, uuid.UUID, int8) error ChangeEmail(context.Context, uuid.UUID, string) error ChangeStatus(context.Context, uuid.UUID, string) error }
UserRepository represent the unit repository contract
type UserUsecase ¶
type UserUsecase interface { Store(context.Context, *User) error GetByID(ctx context.Context, id uuid.UUID) (User, error) CheckIfNipExists(ctx context.Context, nip *string) (bool, error) UpdateProfile(context.Context, *User) (User, error) ChangePassword(context.Context, uuid.UUID, *ChangePasswordRequest) error AccountSubmission(context.Context, *JwtCustomClaims, string) (AccountSubmission, error) RegisterByInvitation(ctx context.Context, user *User) error // domain mana yach? Fetch(context.Context, *JwtCustomClaims, *Request) (res []User, total int64, err error) SetAsAdmin(context.Context, uuid.UUID, *CheckPasswordRequest, uuid.UUID) error ChangeEmail(context.Context, uuid.UUID, *CheckPasswordRequest, uuid.UUID) error ChangeStatus(context.Context, uuid.UUID, *CheckPasswordRequest, uuid.UUID) error }
UserUsecase ...
type VisitorUsecase ¶
type VisitorUsecase interface {
GetCounterVisitor(ctx context.Context, path string) CounterVisitorResponse
}
Source Files ¶
- additional_information.go
- applications.go
- area.go
- auth.go
- award.go
- category.go
- data_tag.go
- district.go
- document_archive.go
- errors.go
- event.go
- feature-toggle.go
- featured_program.go
- feedback.go
- general_information.go
- government_affair.go
- infographic_banner.go
- information.go
- jsonhandle.go
- logo.go
- mail.go
- main_service.go
- master_data_publication.go
- master_data_service.go
- media.go
- news.go
- nullhandle.go
- permission.go
- pop_up_banner.go
- public_service.go
- quick_access.go
- redis.go
- registration_invitation.go
- request.go
- result.go
- role.go
- role_permission.go
- search.go
- service_public.go
- spbe_rals.go
- tag.go
- template.go
- unit.go
- uptd_cabdin.go
- user.go
- visitor.go