title: Understanding interface inside interface(Embedded Interface)
body: <p>I was trying to understand the Interface embedding with the following code.</p>
  
  <p>I have the following: </p>
  
  <pre><code>type MyprojectV1alpha1Interface interface {
      RESTClient() rest.Interface
      SamplesGetter
  }
  
  // SamplesGetter has a method to return a SampleInterface.
  // A group's client should implement this interface.
  type SamplesGetter interface {
      Samples(namespace string) SampleInterface
  }
  
  // SampleInterface has methods to work with Sample resources.
  type SampleInterface interface {
      Create(*v1alpha1.Sample) (*v1alpha1.Sample, error)
      Update(*v1alpha1.Sample) (*v1alpha1.Sample, error)
      Delete(name string, options *v1.DeleteOptions) error
      DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
      Get(name string, options v1.GetOptions) (*v1alpha1.Sample, error)
      List(opts v1.ListOptions) (*v1alpha1.SampleList, error)
      Watch(opts v1.ListOptions) (watch.Interface, error)
      Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.Sample, err error)
      SampleExpansion
  }
  </code></pre>
  
  <p>Now if I have the follwoing:</p>
  
  <pre><code>func returninterface() MyprojectV1alpha1Interface {
  //does something and returns me MyprojectV1alpha1Interface
  }
  temp := returninterface()
  </code></pre>
  
  <p>Now, from the MyprojectV1alpha1Interface if I want to call the </p>
  
  <blockquote>
    <p>Create function  of SampleInterface</p>
  </blockquote>
  
  <p>what I need to do?</p>
  
  <p>Also, please explain me how this interfaces work in Golang.</p>