tenant

package
v0.0.0-...-2d1ab9f Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRequest

type CreateRequest struct {
	ID          string `json:"id,omitempty"`
	DisplayName string `json:"displayName,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateRequest) HasID

func (lr *CreateRequest) HasID() bool

func (*CreateRequest) UnmarshalJSON

func (lr *CreateRequest) UnmarshalJSON(data []byte) error

type CreateResponse

type CreateResponse Tenant

type DeleteAllRequest

type DeleteAllRequest struct {
}

func (*DeleteAllRequest) UnmarshalFromRequest

func (lr *DeleteAllRequest) UnmarshalFromRequest(r *http.Request) error

type DeleteAllResponse

type DeleteAllResponse struct{}

type DeleteRequest

type DeleteRequest struct {
	ID string `json:"id"`
}

func (*DeleteRequest) UnmarshalFromRequest

func (lr *DeleteRequest) UnmarshalFromRequest(r *http.Request) error

type DeleteResponse

type DeleteResponse struct{}

type GetRequest

type GetRequest struct {
	ID string `json:"id"`
}

func (*GetRequest) UnmarshalFromRequest

func (lr *GetRequest) UnmarshalFromRequest(r *http.Request) error

type GetResponse

type GetResponse Tenant

type HandlerImpl

type HandlerImpl struct {
	Descope *client.DescopeClient
}

func (*HandlerImpl) Create

func (h *HandlerImpl) Create(ctx context.Context, req CreateRequest) (*CreateResponse, error)

func (*HandlerImpl) Delete

func (h *HandlerImpl) Delete(ctx context.Context, req DeleteRequest) error

func (*HandlerImpl) DeleteAll

func (h *HandlerImpl) DeleteAll(ctx context.Context, _ DeleteAllRequest) error

func (*HandlerImpl) Get

func (h *HandlerImpl) Get(ctx context.Context, req GetRequest) (*GetResponse, error)

func (*HandlerImpl) List

func (h *HandlerImpl) List(ctx context.Context, req ListRequest) (*ListResponse, error)

func (*HandlerImpl) Patch

func (h *HandlerImpl) Patch(ctx context.Context, req PatchRequest) (*PatchResponse, error)

func (*HandlerImpl) Update

func (h *HandlerImpl) Update(ctx context.Context, req UpdateRequest) (*UpdateResponse, error)

type ListRequest

type ListRequest struct {
	Offset      *uint    `url:"_offset,omitempty"`
	Count       *uint    `url:"_count,omitempty"`
	Sort        []string `url:"_sort,omitempty"`
	ID          *string  `url:"id,omitempty"`
	DisplayName *string  `url:"displayName,omitempty"`
	// contains filtered or unexported fields
}

func (*ListRequest) HasDisplayName

func (lr *ListRequest) HasDisplayName() bool

func (*ListRequest) HasID

func (lr *ListRequest) HasID() bool

func (*ListRequest) UnmarshalFromRequest

func (lr *ListRequest) UnmarshalFromRequest(r *http.Request) error

type ListResponse

type ListResponse struct {
	TotalCount uint     `json:"totalCount"`
	Items      []Tenant `json:"items"`
}

type PatchRequest

type PatchRequest struct {
	ID          string  `json:"id"`
	DisplayName *string `json:"displayName,omitempty"`
	// contains filtered or unexported fields
}

func (*PatchRequest) HasDisplayName

func (lr *PatchRequest) HasDisplayName() bool

func (*PatchRequest) UnmarshalJSON

func (lr *PatchRequest) UnmarshalJSON(data []byte) error

type PatchResponse

type PatchResponse Tenant

type Server

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

func NewServer

func NewServer(pool *pgxpool.Pool, handler Handler) *Server

func (*Server) Create

func (s *Server) Create(w http.ResponseWriter, r *http.Request)

func (*Server) Delete

func (s *Server) Delete(w http.ResponseWriter, r *http.Request)

func (*Server) DeleteAll

func (s *Server) DeleteAll(w http.ResponseWriter, r *http.Request)

func (*Server) Get

func (s *Server) Get(w http.ResponseWriter, r *http.Request)

func (*Server) List

func (s *Server) List(w http.ResponseWriter, r *http.Request)

func (*Server) Patch

func (s *Server) Patch(w http.ResponseWriter, r *http.Request)

func (*Server) Register

func (s *Server) Register(mux *http.ServeMux)

func (*Server) Update

func (s *Server) Update(w http.ResponseWriter, r *http.Request)

type Tenant

type Tenant struct {
	ID          string    `json:"id"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
	DisplayName string    `json:"displayName"`
}

type UpdateRequest

type UpdateRequest struct {
	ID          string `json:"id"`
	DisplayName string `json:"displayName,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) UnmarshalJSON

func (lr *UpdateRequest) UnmarshalJSON(data []byte) error

type UpdateResponse

type UpdateResponse Tenant

Jump to

Keyboard shortcuts

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