Skip to content

autom8ter/api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api

-- import "github.com/autom8ter/api"

Package api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Usage

func RegisterDBServiceHandler

func RegisterDBServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterDBServiceHandler registers the http handlers for service DBService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterDBServiceHandlerClient

func RegisterDBServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DBServiceClient) error

RegisterDBServiceHandlerClient registers the http handlers for service DBService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DBServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DBServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DBServiceClient" to call the correct interceptors.

func RegisterDBServiceHandlerFromEndpoint

func RegisterDBServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterDBServiceHandlerFromEndpoint is same as RegisterDBServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterDebugServiceHandler

func RegisterDebugServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterDebugServiceHandler registers the http handlers for service DebugService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterDebugServiceHandlerClient

func RegisterDebugServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DebugServiceClient) error

RegisterDebugServiceHandlerClient registers the http handlers for service DebugService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DebugServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DebugServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DebugServiceClient" to call the correct interceptors.

func RegisterDebugServiceHandlerFromEndpoint

func RegisterDebugServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterDebugServiceHandlerFromEndpoint is same as RegisterDebugServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

type Address

type Address struct {
	City                 string   `protobuf:"bytes,1,opt,name=city,proto3" json:"city,omitempty"`
	State                string   `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	Line1                string   `protobuf:"bytes,3,opt,name=line1,proto3" json:"line1,omitempty"`
	Line2                string   `protobuf:"bytes,4,opt,name=line2,proto3" json:"line2,omitempty"`
	Zip                  string   `protobuf:"bytes,5,opt,name=zip,proto3" json:"zip,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Address) Descriptor

func (*Address) Descriptor() ([]byte, []int)

func (*Address) GetCity

func (m *Address) GetCity() string

func (*Address) GetLine1

func (m *Address) GetLine1() string

func (*Address) GetLine2

func (m *Address) GetLine2() string

func (*Address) GetState

func (m *Address) GetState() string

func (*Address) GetZip

func (m *Address) GetZip() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) Reset

func (m *Address) Reset()

func (*Address) String

func (m *Address) String() string

func (*Address) XXX_DiscardUnknown

func (m *Address) XXX_DiscardUnknown()

func (*Address) XXX_Marshal

func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Address) XXX_Merge

func (m *Address) XXX_Merge(src proto.Message)

func (*Address) XXX_Size

func (m *Address) XXX_Size() int

func (*Address) XXX_Unmarshal

func (m *Address) XXX_Unmarshal(b []byte) error

type AppMetadata

type AppMetadata struct {
	Description          string            `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	AccountBalance       string            `protobuf:"bytes,2,opt,name=account_balance,json=accountBalance,proto3" json:"account_balance,omitempty"`
	Plan                 *Plan             `protobuf:"bytes,3,opt,name=plan,proto3" json:"plan,omitempty"`
	Tags                 map[string]string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	Card                 *Card             `protobuf:"bytes,5,opt,name=card,proto3" json:"card,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*AppMetadata) Descriptor

func (*AppMetadata) Descriptor() ([]byte, []int)

func (*AppMetadata) GetAccountBalance

func (m *AppMetadata) GetAccountBalance() string

func (*AppMetadata) GetCard

func (m *AppMetadata) GetCard() *Card

func (*AppMetadata) GetDescription

func (m *AppMetadata) GetDescription() string

func (*AppMetadata) GetPlan

func (m *AppMetadata) GetPlan() *Plan

func (*AppMetadata) GetTags

func (m *AppMetadata) GetTags() map[string]string

func (*AppMetadata) ProtoMessage

func (*AppMetadata) ProtoMessage()

func (*AppMetadata) Reset

func (m *AppMetadata) Reset()

func (*AppMetadata) String

func (m *AppMetadata) String() string

func (*AppMetadata) XXX_DiscardUnknown

func (m *AppMetadata) XXX_DiscardUnknown()

func (*AppMetadata) XXX_Marshal

func (m *AppMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AppMetadata) XXX_Merge

func (m *AppMetadata) XXX_Merge(src proto.Message)

func (*AppMetadata) XXX_Size

func (m *AppMetadata) XXX_Size() int

func (*AppMetadata) XXX_Unmarshal

func (m *AppMetadata) XXX_Unmarshal(b []byte) error

type Card

type Card struct {
	Number               string   `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"`
	ExpMonth             string   `protobuf:"bytes,2,opt,name=exp_month,json=expMonth,proto3" json:"exp_month,omitempty"`
	ExpYear              string   `protobuf:"bytes,3,opt,name=exp_year,json=expYear,proto3" json:"exp_year,omitempty"`
	Cvc                  string   `protobuf:"bytes,4,opt,name=cvc,proto3" json:"cvc,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Card) Descriptor

func (*Card) Descriptor() ([]byte, []int)

func (*Card) GetCvc

func (m *Card) GetCvc() string

func (*Card) GetExpMonth

func (m *Card) GetExpMonth() string

func (*Card) GetExpYear

func (m *Card) GetExpYear() string

func (*Card) GetNumber

func (m *Card) GetNumber() string

func (*Card) ProtoMessage

func (*Card) ProtoMessage()

func (*Card) Reset

func (m *Card) Reset()

func (*Card) String

func (m *Card) String() string

func (*Card) XXX_DiscardUnknown

func (m *Card) XXX_DiscardUnknown()

func (*Card) XXX_Marshal

func (m *Card) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Card) XXX_Merge

func (m *Card) XXX_Merge(src proto.Message)

func (*Card) XXX_Size

func (m *Card) XXX_Size() int

func (*Card) XXX_Unmarshal

func (m *Card) XXX_Unmarshal(b []byte) error

type Identity

type Identity struct {
	Connection           string   `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"`
	UserId               string   `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Provider             string   `protobuf:"bytes,3,opt,name=provider,proto3" json:"provider,omitempty"`
	IsSocial             bool     `protobuf:"varint,4,opt,name=isSocial,proto3" json:"isSocial,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Identity) Descriptor

func (*Identity) Descriptor() ([]byte, []int)

func (*Identity) GetConnection

func (m *Identity) GetConnection() string

func (*Identity) GetIsSocial

func (m *Identity) GetIsSocial() bool

func (*Identity) GetProvider

func (m *Identity) GetProvider() string

func (*Identity) GetUserId

func (m *Identity) GetUserId() string

func (*Identity) ProtoMessage

func (*Identity) ProtoMessage()

func (*Identity) Reset

func (m *Identity) Reset()

func (*Identity) String

func (m *Identity) String() string

func (*Identity) XXX_DiscardUnknown

func (m *Identity) XXX_DiscardUnknown()

func (*Identity) XXX_Marshal

func (m *Identity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Identity) XXX_Merge

func (m *Identity) XXX_Merge(src proto.Message)

func (*Identity) XXX_Size

func (m *Identity) XXX_Size() int

func (*Identity) XXX_Unmarshal

func (m *Identity) XXX_Unmarshal(b []byte) error

type Plan

type Plan struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Active               bool     `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"`
	Amount               int64    `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
	Interval             string   `protobuf:"bytes,4,opt,name=interval,proto3" json:"interval,omitempty"`
	Nickname             string   `protobuf:"bytes,5,opt,name=nickname,proto3" json:"nickname,omitempty"`
	Product              *Product `protobuf:"bytes,6,opt,name=product,proto3" json:"product,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Plan) Descriptor

func (*Plan) Descriptor() ([]byte, []int)

func (*Plan) GetActive

func (m *Plan) GetActive() bool

func (*Plan) GetAmount

func (m *Plan) GetAmount() int64

func (*Plan) GetId

func (m *Plan) GetId() string

func (*Plan) GetInterval

func (m *Plan) GetInterval() string

func (*Plan) GetNickname

func (m *Plan) GetNickname() string

func (*Plan) GetProduct

func (m *Plan) GetProduct() *Product

func (*Plan) ProtoMessage

func (*Plan) ProtoMessage()

func (*Plan) Reset

func (m *Plan) Reset()

func (*Plan) String

func (m *Plan) String() string

func (*Plan) XXX_DiscardUnknown

func (m *Plan) XXX_DiscardUnknown()

func (*Plan) XXX_Marshal

func (m *Plan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Plan) XXX_Merge

func (m *Plan) XXX_Merge(src proto.Message)

func (*Plan) XXX_Size

func (m *Plan) XXX_Size() int

func (*Plan) XXX_Unmarshal

func (m *Plan) XXX_Unmarshal(b []byte) error

type Product

type Product struct {
	Id                   string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Description          string            `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Url                  string            `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
	Tags                 map[string]string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*Product) Descriptor

func (*Product) Descriptor() ([]byte, []int)

func (*Product) GetDescription

func (m *Product) GetDescription() string

func (*Product) GetId

func (m *Product) GetId() string

func (*Product) GetTags

func (m *Product) GetTags() map[string]string

func (*Product) GetUrl

func (m *Product) GetUrl() string

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) Reset

func (m *Product) Reset()

func (*Product) String

func (m *Product) String() string

func (*Product) XXX_DiscardUnknown

func (m *Product) XXX_DiscardUnknown()

func (*Product) XXX_Marshal

func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Product) XXX_Merge

func (m *Product) XXX_Merge(src proto.Message)

func (*Product) XXX_Size

func (m *Product) XXX_Size() int

func (*Product) XXX_Unmarshal

func (m *Product) XXX_Unmarshal(b []byte) error

type Role

type Role struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Description          string   `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Role) Descriptor

func (*Role) Descriptor() ([]byte, []int)

func (*Role) GetDescription

func (m *Role) GetDescription() string

func (*Role) GetId

func (m *Role) GetId() string

func (*Role) GetName

func (m *Role) GetName() string

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) Reset

func (m *Role) Reset()

func (*Role) String

func (m *Role) String() string

func (*Role) XXX_DiscardUnknown

func (m *Role) XXX_DiscardUnknown()

func (*Role) XXX_Marshal

func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Role) XXX_Merge

func (m *Role) XXX_Merge(src proto.Message)

func (*Role) XXX_Size

func (m *Role) XXX_Size() int

func (*Role) XXX_Unmarshal

func (m *Role) XXX_Unmarshal(b []byte) error

type User

type User struct {
	UserId               string            `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Name                 string            `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	GivenName            string            `protobuf:"bytes,3,opt,name=given_name,json=givenName,proto3" json:"given_name,omitempty"`
	FamilyName           string            `protobuf:"bytes,4,opt,name=family_name,json=familyName,proto3" json:"family_name,omitempty"`
	Gender               string            `protobuf:"bytes,5,opt,name=gender,proto3" json:"gender,omitempty"`
	Birthdate            string            `protobuf:"bytes,6,opt,name=birthdate,proto3" json:"birthdate,omitempty"`
	Email                string            `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"`
	PhoneNumber          string            `protobuf:"bytes,8,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"`
	Picture              string            `protobuf:"bytes,9,opt,name=picture,proto3" json:"picture,omitempty"`
	Nickname             string            `protobuf:"bytes,14,opt,name=nickname,proto3" json:"nickname,omitempty"`
	UserMetadata         map[string]string `protobuf:"bytes,10,rep,name=user_metadata,json=userMetadata,proto3" json:"user_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	AppMetadata          map[string]string `protobuf:"bytes,11,rep,name=app_metadata,json=appMetadata,proto3" json:"app_metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	LastIp               string            `protobuf:"bytes,12,opt,name=last_ip,json=lastIp,proto3" json:"last_ip,omitempty"`
	Blocked              bool              `protobuf:"varint,13,opt,name=blocked,proto3" json:"blocked,omitempty"`
	Multifactor          []string          `protobuf:"bytes,15,rep,name=multifactor,proto3" json:"multifactor,omitempty"`
	CreatedAt            string            `protobuf:"bytes,17,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	UpdatedAt            string            `protobuf:"bytes,18,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	PhoneVerified        bool              `protobuf:"varint,19,opt,name=phone_verified,json=phoneVerified,proto3" json:"phone_verified,omitempty"`
	EmailVerified        bool              `protobuf:"varint,20,opt,name=email_verified,json=emailVerified,proto3" json:"email_verified,omitempty"`
	Password             string            `protobuf:"bytes,21,opt,name=password,proto3" json:"password,omitempty"`
	Identities           []*Identity       `protobuf:"bytes,22,rep,name=identities,proto3" json:"identities,omitempty"`
	Roles                []*Role           `protobuf:"bytes,23,rep,name=roles,proto3" json:"roles,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*User) Descriptor

func (*User) Descriptor() ([]byte, []int)

func (*User) GetAppMetadata

func (m *User) GetAppMetadata() map[string]string

func (*User) GetBirthdate

func (m *User) GetBirthdate() string

func (*User) GetBlocked

func (m *User) GetBlocked() bool

func (*User) GetCreatedAt

func (m *User) GetCreatedAt() string

func (*User) GetEmail

func (m *User) GetEmail() string

func (*User) GetEmailVerified

func (m *User) GetEmailVerified() bool

func (*User) GetFamilyName

func (m *User) GetFamilyName() string

func (*User) GetGender

func (m *User) GetGender() string

func (*User) GetGivenName

func (m *User) GetGivenName() string

func (*User) GetIdentities

func (m *User) GetIdentities() []*Identity

func (*User) GetLastIp

func (m *User) GetLastIp() string

func (*User) GetMultifactor

func (m *User) GetMultifactor() []string

func (*User) GetName

func (m *User) GetName() string

func (*User) GetNickname

func (m *User) GetNickname() string

func (*User) GetPassword

func (m *User) GetPassword() string

func (*User) GetPhoneNumber

func (m *User) GetPhoneNumber() string

func (*User) GetPhoneVerified

func (m *User) GetPhoneVerified() bool

func (*User) GetPicture

func (m *User) GetPicture() string

func (*User) GetRoles

func (m *User) GetRoles() []*Role

func (*User) GetUpdatedAt

func (m *User) GetUpdatedAt() string

func (*User) GetUserId

func (m *User) GetUserId() string

func (*User) GetUserMetadata

func (m *User) GetUserMetadata() map[string]string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

type UserMetadata

type UserMetadata struct {
	Status               string            `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Bio                  map[string]string `protobuf:"bytes,2,rep,name=bio,proto3" json:"bio,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	Address              *Address          `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	Tags                 map[string]string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*UserMetadata) Descriptor

func (*UserMetadata) Descriptor() ([]byte, []int)

func (*UserMetadata) GetAddress

func (m *UserMetadata) GetAddress() *Address

func (*UserMetadata) GetBio

func (m *UserMetadata) GetBio() map[string]string

func (*UserMetadata) GetStatus

func (m *UserMetadata) GetStatus() string

func (*UserMetadata) GetTags

func (m *UserMetadata) GetTags() map[string]string

func (*UserMetadata) ProtoMessage

func (*UserMetadata) ProtoMessage()

func (*UserMetadata) Reset

func (m *UserMetadata) Reset()

func (*UserMetadata) String

func (m *UserMetadata) String() string

func (*UserMetadata) XXX_DiscardUnknown

func (m *UserMetadata) XXX_DiscardUnknown()

func (*UserMetadata) XXX_Marshal

func (m *UserMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserMetadata) XXX_Merge

func (m *UserMetadata) XXX_Merge(src proto.Message)

func (*UserMetadata) XXX_Size

func (m *UserMetadata) XXX_Size() int

func (*UserMetadata) XXX_Unmarshal

func (m *UserMetadata) XXX_Unmarshal(b []byte) error