Documentation ¶
Overview ¶
Package resource is a generated protocol buffer package.
It is generated from these files:
github.com/appcelerator/amp/api/rpc/resource/resource.proto
It has these top-level messages:
ResourceEntry ListRequest ListReply AddToTeamRequest RemoveFromTeamRequest ChangePermissionLevelRequest
Package resource is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterResourceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterResourceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ResourceClient) error
- func RegisterResourceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterResourceServer(s *grpc.Server, srv ResourceServer)
- type Action
- type AddToTeamRequest
- func (*AddToTeamRequest) Descriptor() ([]byte, []int)
- func (m *AddToTeamRequest) GetOrganizationName() string
- func (m *AddToTeamRequest) GetResourceId() string
- func (m *AddToTeamRequest) GetTeamName() string
- func (*AddToTeamRequest) ProtoMessage()
- func (m *AddToTeamRequest) Reset()
- func (m *AddToTeamRequest) String() string
- type ChangePermissionLevelRequest
- func (*ChangePermissionLevelRequest) Descriptor() ([]byte, []int)
- func (m *ChangePermissionLevelRequest) GetOrganizationName() string
- func (m *ChangePermissionLevelRequest) GetPermissionLevel() accounts.TeamPermissionLevel
- func (m *ChangePermissionLevelRequest) GetResourceId() string
- func (m *ChangePermissionLevelRequest) GetTeamName() string
- func (*ChangePermissionLevelRequest) ProtoMessage()
- func (m *ChangePermissionLevelRequest) Reset()
- func (m *ChangePermissionLevelRequest) String() string
- type ListReply
- type ListRequest
- type RemoveFromTeamRequest
- func (*RemoveFromTeamRequest) Descriptor() ([]byte, []int)
- func (m *RemoveFromTeamRequest) GetOrganizationName() string
- func (m *RemoveFromTeamRequest) GetResourceId() string
- func (m *RemoveFromTeamRequest) GetTeamName() string
- func (*RemoveFromTeamRequest) ProtoMessage()
- func (m *RemoveFromTeamRequest) Reset()
- func (m *RemoveFromTeamRequest) String() string
- type ResourceClient
- type ResourceEntry
- func (*ResourceEntry) Descriptor() ([]byte, []int)
- func (m *ResourceEntry) GetId() string
- func (m *ResourceEntry) GetName() string
- func (m *ResourceEntry) GetOwner() *accounts.Account
- func (m *ResourceEntry) GetType() ResourceType
- func (*ResourceEntry) ProtoMessage()
- func (m *ResourceEntry) Reset()
- func (m *ResourceEntry) String() string
- type ResourceServer
- type ResourceType
- type Server
- func (s *Server) ResourceAddToTeam(ctx context.Context, in *AddToTeamRequest) (*empty.Empty, error)
- func (s *Server) ResourceChangePermissionLevel(ctx context.Context, in *ChangePermissionLevelRequest) (*empty.Empty, error)
- func (s *Server) ResourceList(ctx context.Context, in *ListRequest) (*ListReply, error)
- func (s *Server) ResourceRemoveFromTeam(ctx context.Context, in *RemoveFromTeamRequest) (*empty.Empty, error)
Constants ¶
This section is empty.
Variables ¶
var Action_name = map[int32]string{
0: "ACTION_CREATE",
1: "ACTION_READ",
2: "ACTION_UPDATE",
3: "ACTION_DELETE",
}
var Action_value = map[string]int32{
"ACTION_CREATE": 0,
"ACTION_READ": 1,
"ACTION_UPDATE": 2,
"ACTION_DELETE": 3,
}
var ResourceType_name = map[int32]string{
0: "RESOURCE_STACK",
1: "RESOURCE_DASHBOARD",
2: "RESOURCE_USER",
3: "RESOURCE_ORGANIZATION",
4: "RESOURCE_TEAM",
}
var ResourceType_value = map[string]int32{
"RESOURCE_STACK": 0,
"RESOURCE_DASHBOARD": 1,
"RESOURCE_USER": 2,
"RESOURCE_ORGANIZATION": 3,
"RESOURCE_TEAM": 4,
}
Functions ¶
func RegisterResourceHandler ¶
func RegisterResourceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterResourceHandler registers the http handlers for service Resource to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterResourceHandlerClient ¶ added in v0.16.0
func RegisterResourceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ResourceClient) error
RegisterResourceHandler registers the http handlers for service Resource to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ResourceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ResourceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ResourceClient" to call the correct interceptors.
func RegisterResourceHandlerFromEndpoint ¶
func RegisterResourceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterResourceHandlerFromEndpoint is same as RegisterResourceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterResourceServer ¶
func RegisterResourceServer(s *grpc.Server, srv ResourceServer)
Types ¶
type AddToTeamRequest ¶
type AddToTeamRequest struct { ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId" json:"resource_id,omitempty"` OrganizationName string `protobuf:"bytes,2,opt,name=organization_name,json=organizationName" json:"organization_name,omitempty"` TeamName string `protobuf:"bytes,3,opt,name=team_name,json=teamName" json:"team_name,omitempty"` }
func (*AddToTeamRequest) Descriptor ¶
func (*AddToTeamRequest) Descriptor() ([]byte, []int)
func (*AddToTeamRequest) GetOrganizationName ¶
func (m *AddToTeamRequest) GetOrganizationName() string
func (*AddToTeamRequest) GetResourceId ¶
func (m *AddToTeamRequest) GetResourceId() string
func (*AddToTeamRequest) GetTeamName ¶
func (m *AddToTeamRequest) GetTeamName() string
func (*AddToTeamRequest) ProtoMessage ¶
func (*AddToTeamRequest) ProtoMessage()
func (*AddToTeamRequest) Reset ¶
func (m *AddToTeamRequest) Reset()
func (*AddToTeamRequest) String ¶
func (m *AddToTeamRequest) String() string
type ChangePermissionLevelRequest ¶
type ChangePermissionLevelRequest struct { OrganizationName string `protobuf:"bytes,1,opt,name=organization_name,json=organizationName" json:"organization_name,omitempty"` TeamName string `protobuf:"bytes,2,opt,name=team_name,json=teamName" json:"team_name,omitempty"` ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId" json:"resource_id,omitempty"` PermissionLevel accounts.TeamPermissionLevel `` /* 134-byte string literal not displayed */ }
func (*ChangePermissionLevelRequest) Descriptor ¶
func (*ChangePermissionLevelRequest) Descriptor() ([]byte, []int)
func (*ChangePermissionLevelRequest) GetOrganizationName ¶
func (m *ChangePermissionLevelRequest) GetOrganizationName() string
func (*ChangePermissionLevelRequest) GetPermissionLevel ¶
func (m *ChangePermissionLevelRequest) GetPermissionLevel() accounts.TeamPermissionLevel
func (*ChangePermissionLevelRequest) GetResourceId ¶
func (m *ChangePermissionLevelRequest) GetResourceId() string
func (*ChangePermissionLevelRequest) GetTeamName ¶
func (m *ChangePermissionLevelRequest) GetTeamName() string
func (*ChangePermissionLevelRequest) ProtoMessage ¶
func (*ChangePermissionLevelRequest) ProtoMessage()
func (*ChangePermissionLevelRequest) Reset ¶
func (m *ChangePermissionLevelRequest) Reset()
func (*ChangePermissionLevelRequest) String ¶
func (m *ChangePermissionLevelRequest) String() string
type ListReply ¶
type ListReply struct {
Resources []*ResourceEntry `protobuf:"bytes,1,rep,name=resources" json:"resources,omitempty"`
}
func (*ListReply) Descriptor ¶
func (*ListReply) GetResources ¶
func (m *ListReply) GetResources() []*ResourceEntry
func (*ListReply) ProtoMessage ¶
func (*ListReply) ProtoMessage()
type ListRequest ¶
type ListRequest struct { }
func (*ListRequest) Descriptor ¶
func (*ListRequest) Descriptor() ([]byte, []int)
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) Reset ¶
func (m *ListRequest) Reset()
func (*ListRequest) String ¶
func (m *ListRequest) String() string
type RemoveFromTeamRequest ¶
type RemoveFromTeamRequest struct { ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId" json:"resource_id,omitempty"` OrganizationName string `protobuf:"bytes,2,opt,name=organization_name,json=organizationName" json:"organization_name,omitempty"` TeamName string `protobuf:"bytes,3,opt,name=team_name,json=teamName" json:"team_name,omitempty"` }
func (*RemoveFromTeamRequest) Descriptor ¶
func (*RemoveFromTeamRequest) Descriptor() ([]byte, []int)
func (*RemoveFromTeamRequest) GetOrganizationName ¶
func (m *RemoveFromTeamRequest) GetOrganizationName() string
func (*RemoveFromTeamRequest) GetResourceId ¶
func (m *RemoveFromTeamRequest) GetResourceId() string
func (*RemoveFromTeamRequest) GetTeamName ¶
func (m *RemoveFromTeamRequest) GetTeamName() string
func (*RemoveFromTeamRequest) ProtoMessage ¶
func (*RemoveFromTeamRequest) ProtoMessage()
func (*RemoveFromTeamRequest) Reset ¶
func (m *RemoveFromTeamRequest) Reset()
func (*RemoveFromTeamRequest) String ¶
func (m *RemoveFromTeamRequest) String() string
type ResourceClient ¶
type ResourceClient interface { ResourceList(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListReply, error) ResourceAddToTeam(ctx context.Context, in *AddToTeamRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) ResourceChangePermissionLevel(ctx context.Context, in *ChangePermissionLevelRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) ResourceRemoveFromTeam(ctx context.Context, in *RemoveFromTeamRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) }
func NewResourceClient ¶
func NewResourceClient(cc *grpc.ClientConn) ResourceClient
type ResourceEntry ¶
type ResourceEntry struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Type ResourceType `protobuf:"varint,2,opt,name=type,enum=resource.ResourceType" json:"type,omitempty"` Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` Owner *accounts.Account `protobuf:"bytes,4,opt,name=owner" json:"owner,omitempty"` }
func (*ResourceEntry) Descriptor ¶
func (*ResourceEntry) Descriptor() ([]byte, []int)
func (*ResourceEntry) GetId ¶
func (m *ResourceEntry) GetId() string
func (*ResourceEntry) GetName ¶
func (m *ResourceEntry) GetName() string
func (*ResourceEntry) GetOwner ¶
func (m *ResourceEntry) GetOwner() *accounts.Account
func (*ResourceEntry) GetType ¶
func (m *ResourceEntry) GetType() ResourceType
func (*ResourceEntry) ProtoMessage ¶
func (*ResourceEntry) ProtoMessage()
func (*ResourceEntry) Reset ¶
func (m *ResourceEntry) Reset()
func (*ResourceEntry) String ¶
func (m *ResourceEntry) String() string
type ResourceServer ¶
type ResourceServer interface { ResourceList(context.Context, *ListRequest) (*ListReply, error) ResourceAddToTeam(context.Context, *AddToTeamRequest) (*google_protobuf.Empty, error) ResourceChangePermissionLevel(context.Context, *ChangePermissionLevelRequest) (*google_protobuf.Empty, error) ResourceRemoveFromTeam(context.Context, *RemoveFromTeamRequest) (*google_protobuf.Empty, error) }
type ResourceType ¶
type ResourceType int32
const ( ResourceType_RESOURCE_STACK ResourceType = 0 ResourceType_RESOURCE_DASHBOARD ResourceType = 1 ResourceType_RESOURCE_USER ResourceType = 2 ResourceType_RESOURCE_ORGANIZATION ResourceType = 3 ResourceType_RESOURCE_TEAM ResourceType = 4 )
func (ResourceType) EnumDescriptor ¶
func (ResourceType) EnumDescriptor() ([]byte, []int)
func (ResourceType) String ¶
func (x ResourceType) String() string
type Server ¶
type Server struct { Accounts accounts.Interface Dashboards dashboards.Interface Stacks stacks.Interface }
Server is used to implement resource.ResourceServer
func (*Server) ResourceAddToTeam ¶ added in v0.17.0
AddToTeam implements resource.AddToTeam
func (*Server) ResourceChangePermissionLevel ¶ added in v0.17.0
func (s *Server) ResourceChangePermissionLevel(ctx context.Context, in *ChangePermissionLevelRequest) (*empty.Empty, error)
ChangePermissionLevel implements resource.ChangePermissionLevel
func (*Server) ResourceList ¶ added in v0.17.0
List implements resource.List
func (*Server) ResourceRemoveFromTeam ¶ added in v0.17.0
func (s *Server) ResourceRemoveFromTeam(ctx context.Context, in *RemoveFromTeamRequest) (*empty.Empty, error)
RemoveFromTeam implements resource.RemoveFromTeam