Documentation ¶
Index ¶
- type APIsConfig
- type ClientsConfig
- type Config
- type EventBusConfig
- type Persistence
- type Server
- type Service
- func (s *Service) AddDevice(ctx context.Context, request *pb.AddDeviceRequest) (*pb.AddDeviceResponse, error)
- func (s *Service) DeleteDevices(ctx context.Context, request *pb.DeleteDevicesRequest) (*pb.DeleteDevicesResponse, error)
- func (s *Service) GetDevices(request *pb.GetDevicesRequest, srv pb.IdentityStore_GetDevicesServer) error
- type StorageConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIsConfig ¶
func (*APIsConfig) Validate ¶
func (c *APIsConfig) Validate() error
type ClientsConfig ¶
type ClientsConfig struct { Storage StorageConfig `yaml:"storage" json:"storage"` Eventbus EventBusConfig `yaml:"eventBus" json:"eventBus"` OpenTelemetryCollector otelClient.Config `yaml:"openTelemetryCollector" json:"openTelemetryCollector"` }
func (*ClientsConfig) Validate ¶
func (c *ClientsConfig) Validate() error
type Config ¶
type Config struct { Log log.Config `yaml:"log" json:"log"` APIs APIsConfig `yaml:"apis" json:"apis"` Clients ClientsConfig `yaml:"clients" json:"clients"` }
Config provides defaults and enables configuring via env variables.
type EventBusConfig ¶
type EventBusConfig struct {
NATS natsClient.ConfigPublisher `yaml:"nats" json:"nats"`
}
func (*EventBusConfig) Validate ¶
func (c *EventBusConfig) Validate() error
type Persistence ¶
type Persistence = interface { NewTransaction(ctx context.Context) persistence.PersistenceTx Clear(ctx context.Context) error Close(ctx context.Context) error }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an HTTP server for the Service.
func New ¶
func New(ctx context.Context, cfg Config, fileWatcher *fsnotify.Watcher, logger log.Logger) (*Server, error)
New creates the service's HTTP server.
type Service ¶
type Service struct { pb.UnimplementedIdentityStoreServer // contains filtered or unexported fields }
Service holds dependencies of IdentityStore.
func NewService ¶
func (*Service) AddDevice ¶
func (s *Service) AddDevice(ctx context.Context, request *pb.AddDeviceRequest) (*pb.AddDeviceResponse, error)
AddDevice adds a device to user. It is used by cloud2cloud connector.
func (*Service) DeleteDevices ¶
func (s *Service) DeleteDevices(ctx context.Context, request *pb.DeleteDevicesRequest) (*pb.DeleteDevicesResponse, error)
DeleteDevices removes a devices from user.
func (*Service) GetDevices ¶
func (s *Service) GetDevices(request *pb.GetDevicesRequest, srv pb.IdentityStore_GetDevicesServer) error
GetDevices returns a list of user's devices if the access token is valid.
type StorageConfig ¶
func (*StorageConfig) Validate ¶
func (c *StorageConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.