service

package
v0.0.0-...-b98b87e Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBencanaService

func NewBencanaService(repo repository.BencanaRepository) *bencanaService

func NewKorbanService

func NewKorbanService(repoKorban repository.KorbanRepository, repoPosko repository.PoskoRepository, gcs external.CloudStorageService,
	rekog external.RekognitionService) *korbanService

func NewPoskoService

func NewPoskoService(repo repository.PoskoRepository) *poskoService

Types

type BencanaService

type BencanaService interface {
	FindAll(ctx context.Context) []domain.Bencana
	FindById(ctx context.Context, id string) (*domain.Bencana, error)
	Create(ctx context.Context, bencana domain.Bencana) (*domain.Bencana, error)
	Update(ctx context.Context, id string, bencana domain.Bencana) (*domain.Bencana, error)
	Delete(ctx context.Context, id_bencana string) error
}

type KorbanService

type KorbanService interface {
	FindAll(ctx context.Context, idBencana string) []domain.Korban
	FindById(ctx context.Context, idKorban uuid.UUID) (*domain.Korban, error)
	Create(ctx context.Context, idBencana string, idPosko string, korban domain.Korban) (*domain.Korban, error)
	Update(ctx context.Context, idKorban uuid.UUID, korban domain.Korban) (*domain.Korban, error)
	Delete(ctx context.Context, idKorban uuid.UUID) error
	SearchByFoto(ctx context.Context, idBencana string, reference []byte, condition map[string]interface{}) ([]domain.Korban, error)
}

type PoskoService

type PoskoService interface {
	FindAll(ctx context.Context, id_bencana string) []domain.Posko
	FindById(ctx context.Context, id_bencana string, id_posko string) (*domain.Posko, error)
	Create(ctx context.Context, id_bencana string, posko domain.Posko) (*domain.Posko, error)
	Update(ctx context.Context, id_bencana string, id_posko string, posko domain.Posko) (*domain.Posko, error)
	Delete(ctx context.Context, id_bencana string, id_posko string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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