settings

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

README

Build Status Software License Go Reference

settings

RBAC K/V store for jo-micro/go-micro.

Developers corner

Build podman/docker image
Prerequesits
Build
cp .env.sample .env
task
Remove everything
task rm

Authors

License

Its dual licensed:

  • Apache-2.0
  • GPL-2.0-or-later

Documentation

Index

Constants

View Source
const Name = "settingsClient"

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRequest

type CreateRequest struct {
	Service     string   `json:"service,omitempty"`
	OwnerId     string   `json:"ownerId,omitempty"`
	Name        string   `json:"name,omitempty"`
	Content     []byte   `json:"content,omitempty"`
	RolesRead   []string `json:"rolesRead,omitempty"`
	RolesUpdate []string `json:"rolesUpdate,omitempty"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func MustReg

func MustReg(cReg *components.Registry) *Handler

func New

func New() *Handler

NewLog creates a new component

func (*Handler) Create

func (h *Handler) Create(ctx context.Context, req CreateRequest) (*Setting, error)

func (*Handler) Flags

func (c *Handler) Flags(cReg *components.Registry) []cli.Flag

func (*Handler) Get

func (h *Handler) Get(ctx context.Context, id, ownerId, service, name string) (*Setting, error)

func (*Handler) Health

func (h *Handler) Health(context context.Context) error

func (*Handler) Init

func (h *Handler) Init(cReg *components.Registry, cli *cli.Context) error

func (*Handler) Initialized

func (c *Handler) Initialized() bool

func (*Handler) List

func (h *Handler) List(ctx context.Context, id, ownerId, service, name string) ([]*Setting, error)

func (*Handler) Name

func (c *Handler) Name() string

func (*Handler) Priority

func (c *Handler) Priority() int

func (*Handler) Stop

func (h *Handler) Stop() error

func (*Handler) Update

func (h *Handler) Update(ctx context.Context, req UpdateRequest) (*Setting, error)

func (*Handler) Upsert

func (h *Handler) Upsert(ctx context.Context, req UpsertRequest) (*Setting, error)

type Setting

type Setting struct {
	Id      uuid.UUID       `json:"id,omitempty"`
	Service string          `json:"service,omitempty"`
	OwnerID uuid.UUID       `json:"ownerId,omitempty"`
	Name    string          `json:"name,omitempty"`
	Content json.RawMessage `json:"content,omitempty"`
}

type UpdateRequest

type UpdateRequest struct {
	Id      uuid.UUID `json:"id,omitempty"`
	Content []byte    `json:"content,omitempty"`
}

type UpsertRequest

type UpsertRequest struct {
	// For the Update Selector only
	Id      uuid.UUID `json:"id,omitempty"`
	OwnerId uuid.UUID `json:"ownerId,omitempty"`
	Service string    `json:"service,omitempty"`
	Name    string    `json:"name,omitempty"`
	// Upsert content
	Content     []byte   `json:"content,omitempty"`
	RolesRead   []string `json:"rolesRead,omitempty"`
	RolesUpdate []string `json:"rolesUpdate,omitempty"`
}

Directories

Path Synopsis
cmd
proto

Jump to

Keyboard shortcuts

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