Documentation ¶
Index ¶
- type AccessDetails
- type Article
- type ArticleModel
- func (m ArticleModel) Create(userID string, form forms.CreateArticleForm) (articleID string, err error)
- func (m ArticleModel) Delete(userID, id string) (err error)
- func (m ArticleModel) GetAll(userID string) ([]ArticleResp, error)
- func (m ArticleModel) One(userID string, id string) (Article, error)
- func (m ArticleModel) Update(userID string, id string, form forms.CreateArticleForm) (err error)
- type ArticleResp
- type AuthModel
- func (m AuthModel) CreateAuth(userid string, td *TokenDetails) error
- func (m AuthModel) CreateToken(userID string) (*TokenDetails, error)
- func (m AuthModel) DeleteAuth(givenUUID string) (int64, error)
- func (m AuthModel) ExtractToken(r *http.Request) string
- func (m AuthModel) ExtractTokenMetadata(r *http.Request) (*AccessDetails, error)
- func (m AuthModel) FetchAuth(authD *AccessDetails) (string, error)
- func (m AuthModel) TokenValid(r *http.Request) error
- func (m AuthModel) VerifyToken(r *http.Request) (*jwt.Token, error)
- type DataList
- type Informasi
- type InformasiResp
- type JSONRaw
- type Pendaftaran
- type PendaftaranResp
- type Pengaduan
- type PengaduanResp
- type Perusahaan
- type PerusahaanResp
- type Token
- type TokenDetails
- type User
- type UserModel
- type UserSessionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessDetails ¶
AccessDetails ...
type Article ¶
type Article struct { ID string `db:"id, primarykey" json:"id"` UserID string `db:"user_id" json:"-"` Title string `db:"title" json:"title"` Content string `db:"content" json:"content"` UrlPhoto sql.NullString `db:"url_photo" json:"url_photo"` UpdatedAt int64 `db:"updated_at" json:"updated_at"` CreatedAt int64 `db:"created_at" json:"created_at"` DeletedAt int64 `db:"deleted_at" json:"-"` }
Article ...
type ArticleModel ¶
type ArticleModel struct{}
ArticleModel ...
func (ArticleModel) Create ¶
func (m ArticleModel) Create(userID string, form forms.CreateArticleForm) (articleID string, err error)
Create ...
func (ArticleModel) GetAll ¶
func (m ArticleModel) GetAll(userID string) ([]ArticleResp, error)
All ...
func (ArticleModel) One ¶
func (m ArticleModel) One(userID string, id string) (Article, error)
One ...
func (ArticleModel) Update ¶
func (m ArticleModel) Update(userID string, id string, form forms.CreateArticleForm) (err error)
Update ...
type ArticleResp ¶
type ArticleResp struct { ID string `db:"id, primarykey" json:"id"` // UserID string `db:"user_id" json:"-"` Title string `db:"title" json:"title"` Content string `db:"content" json:"content"` UrlPhoto sql.NullString `db:"url_photo" json:"url_photo"` }
Article ...
type AuthModel ¶
type AuthModel struct{}
AuthModel ...
func (AuthModel) CreateAuth ¶
func (m AuthModel) CreateAuth(userid string, td *TokenDetails) error
CreateAuth ...
func (AuthModel) CreateToken ¶
func (m AuthModel) CreateToken(userID string) (*TokenDetails, error)
CreateToken ...
func (AuthModel) DeleteAuth ¶
DeleteAuth ...
func (AuthModel) ExtractToken ¶
ExtractToken ...
func (AuthModel) ExtractTokenMetadata ¶
func (m AuthModel) ExtractTokenMetadata(r *http.Request) (*AccessDetails, error)
ExtractTokenMetadata ...
type Informasi ¶
type Informasi struct { gorm.Model ID uuid.UUID `gorm:"primary_key:true"` Nama string `json:"nama"` Alamat string `json:"alamat"` Pekerjaan string `json:"pekerjaan"` Telp string `json:"telp"` Email string `json:"email"` NomorIdentitas string `json:"nomorIdentitas"` RincianInformasi string `json:"rincianInformasi"` TujuanInformasi string `json:"tujuanInformasi"` CaraMemperoleh string `json:"caraMemperoleh"` BentukSalinan string `json:"bentukSalinan"` CaraMendapatkan string `json:"caraMendapatkan"` }
type InformasiResp ¶
type InformasiResp struct { ID uuid.UUID `gorm:"primary_key:true"` Nama string `json:"nama"` Alamat string `json:"alamat"` Pekerjaan string `json:"pekerjaan"` Telp string `json:"telp"` Email string `json:"email"` NomorIdentitas string `json:"nomorIdentitas"` RincianInformasi string `json:"rincianInformasi"` TujuanInformasi string `json:"tujuanInformasi"` CaraMemperoleh string `json:"caraMemperoleh"` BentukSalinan string `json:"bentukSalinan"` CaraMendapatkan string `json:"caraMendapatkan"` CreatedAt time.Time `json:"createdAt"` }
type JSONRaw ¶
type JSONRaw json.RawMessage
JSONRaw ...
func (*JSONRaw) UnmarshalJSON ¶
UnmarshalJSON ...
type Pendaftaran ¶
type Pendaftaran struct { gorm.Model ID uuid.UUID `gorm:"primary_key:true"` //Pemohon JenisIdentitasPemohon string `json:"jenisIdentitasPemohon"` NIKPemohon string `json:"nikPemohon"` NamaPemohon string `json:"namaPemohon"` TelpPemohon string `json:"telpPemohon"` AlamatPemohon string `json:"alamatPemohon"` EmailPemohon string `json:"emailPemohon"` PropinsiPemohon string `json:"propinsiPemohon"` KecamatanPemohon string `json:"kecamatanPemohon"` KelurahanPemohon string `json:"kelurahanPemohon"` KabupatenPemohon string `json:"kabupatenPemohon"` KodePosPemohon string `json:"kodePosPemohon"` //perusahaan NPWP string `json:"npwp"` NoRegister string `json:"noRegister"` NamaPerusahaan string `json:"namaPerusahaan"` TelpPerusahaan string `json:"telpPerusahaan"` AlamatPerusahaan string `json:"alamatPerusahaan"` PropinsiPerusahaan string `json:"propinsiPerusahaan"` KecamatanPerusahaan string `json:"kecamatanPerusahaan"` KelurahanPerusahaan string `json:"kelurahanPerusahaan"` KabupatenPerusahaan string `json:"kabupatenPerusahaan"` KodePosPerusahaan string `json:"kodePosPerusahaan"` //Jenis Perijinan JenisPerizinan string `json:"jenisPerizinan"` StatusPendaftaran string `json:"statusPendaftaran"` }
func (*Pendaftaran) BeforeCreate ¶
func (u *Pendaftaran) BeforeCreate(tx *gorm.DB) (err error)
type PendaftaranResp ¶
type PendaftaranResp struct { ID uuid.UUID `gorm:"primary_key:true"` //Pemohon JenisIdentitasPemohon string `json:"jenisIdentitasPemohon"` NIKPemohon string `json:"nikPemohon"` NamaPemohon string `json:"namaPemohon"` TelpPemohon string `json:"telpPemohon"` AlamatPemohon string `json:"alamatPemohon"` EmailPemohon string `json:"emailPemohon"` PropinsiPemohon string `json:"propinsiPemohon"` KecamatanPemohon string `json:"kecamatanPemohon"` KelurahanPemohon string `json:"kelurahanPemohon"` KabupatenPemohon string `json:"kabupatenPemohon"` KodePosPemohon string `json:"kodePosPemohon"` //perusahaan NPWP string `json:"npwp"` NoRegister string `json:"noRegister"` NamaPerusahaan string `json:"namaPerusahaan"` TelpPerusahaan string `json:"telpPerusahaan"` AlamatPerusahaan string `json:"alamatPerusahaan"` PropinsiPerusahaan string `json:"propinsiPerusahaan"` KecamatanPerusahaan string `json:"kecamatanPerusahaan"` KelurahanPerusahaan string `json:"kelurahanPerusahaan"` KabupatenPerusahaan string `json:"kabupatenPerusahaan"` KodePosPerusahaan string `json:"kodePosPerusahaan"` //Jenis Perijinan JenisPerizinan string `json:"jenisPerizinan"` StatusPendaftaran string `json:"statusPendaftaran"` CreatedAt time.Time `json:"createdAt"` }
type Pengaduan ¶
type Pengaduan struct { gorm.Model ID uuid.UUID `gorm:"primary_key:true"` NamaLengkap string `json:"namaLengkap"` Alamat string `json:"alamat"` NomorHP string `json:"nomorhp"` Email string `json:"email"` Pekerjaan string `json:"pekerjaan"` Tujuan string `json:"tujuan"` IsiPengaduan string `json:"isiPengaduan"` }
Pengaduan ...
type PengaduanResp ¶
type PengaduanResp struct { ID uuid.UUID `gorm:"primary_key:true"` NamaLengkap string `json:"namaLengkap"` Alamat string `json:"alamat"` NomorHP string `json:"nomorhp"` Email string `json:"email"` Pekerjaan string `json:"pekerjaan"` Tujuan string `json:"tujuan"` IsiPengaduan string `json:"isiPengaduan"` CreatedAt time.Time `json:"createdAt"` }
Pengaduan ...
type Perusahaan ¶
type Perusahaan struct { gorm.Model ID uuid.UUID `gorm:"primary_key:true"` NPWP string `json:"npwp"` NoRegister string `json:"noRegister"` Nama string `json:"nama"` Telp string `json:"telp"` Alamat string `json:"alamat"` Propinsi string `json:"propinsi"` Kecamatan string `json:"kecamatan"` Kelurahan string `json:"kelurahan"` Kabupaten string `json:"kabupaten"` KodePos string `json:"kodePos"` }
func (*Perusahaan) BeforeCreate ¶
func (u *Perusahaan) BeforeCreate(tx *gorm.DB) (err error)
type PerusahaanResp ¶
type PerusahaanResp struct { ID uuid.UUID `gorm:"primary_key:true"` NPWP string `json:"npwp"` NoRegister string `json:"noRegister"` Nama string `json:"nama"` Telp string `json:"telp"` Alamat string `json:"alamat"` Propinsi string `json:"propinsi"` Kecamatan string `json:"kecamatan"` Kelurahan string `json:"kelurahan"` Kabupaten string `json:"kabupaten"` KodePos string `json:"kodePos"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
type Token ¶
type Token struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` }
Token ...
type TokenDetails ¶
type TokenDetails struct { AccessToken string RefreshToken string AccessUUID string RefreshUUID string AtExpires int64 RtExpires int64 }
TokenDetails ...
type User ¶
type User struct { ID string `db:"id, primarykey" json:"id"` Email string `db:"email" json:"email"` Password string `db:"password" json:"-"` Name string `db:"name" json:"name"` UpdatedAt int64 `db:"updated_at" json:"-"` CreatedAt int64 `db:"created_at" json:"-"` }
User ...
func GetUserLevel ¶
type UserSessionInfo ¶
type UserSessionInfo struct { ID int64 `json:"id"` Name string `json:"name"` Email string `json:"email"` }
UserSessionInfo ...
Click to show internal directories.
Click to hide internal directories.