repository

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 3 Imported by: 0

README

  • Repository is a place where you communicate with the real external data resource, like database, cloud service, external service, etc.
  • It's always better to keep your repository as simple as possible, don't add too much logic here
  • If you have to, you can separate the operations into smaller methods
  • You should always call your repository methods inside the use case package
  • You may use your src/library functions directly in this package
  • Any changes outside this package should not affect your repositories (except changes for business entity)
  • If you need config variables, database frameworks, or external clients, pass/inject them as a dependency
  • You can use your own style as long as it doesn't break the main idea

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	FindExampleByID findExampleByID.Contract
}

func InitRepository

func InitRepository(cfg *config.Config, adapterClient *adapter.Adapter) (*Repository, error)

InitRepository initializes repositories

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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